kopia lustrzana https://github.com/wagtail/wagtail
rodzic
bf8c690edc
commit
dbb4e763ee
wagtail
project_template
utils
wagtailadmin
wagtailcore
|
@ -1,7 +1,7 @@
|
|||
Changelog
|
||||
=========
|
||||
|
||||
0.9 (xx.xx.xxxx)
|
||||
1.0 (xx.xx.xxxx)
|
||||
~~~~~~~~~~~~~~~~
|
||||
|
||||
* Added StreamField, a model field for freeform page content
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
==========================================
|
||||
Wagtail 0.9 release notes - IN DEVELOPMENT
|
||||
Wagtail 1.0 release notes - IN DEVELOPMENT
|
||||
==========================================
|
||||
|
||||
.. contents::
|
|
@ -4,7 +4,7 @@ Release notes
|
|||
.. toctree::
|
||||
:maxdepth: 1
|
||||
|
||||
0.9
|
||||
1.0
|
||||
0.8.6
|
||||
0.8.5
|
||||
0.8.4
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# Minimal requirements
|
||||
Django>=1.7.1,<1.8
|
||||
wagtail==0.8.6
|
||||
wagtail==1.0b1
|
||||
|
||||
# Recommended components (require additional setup):
|
||||
# psycopg2==2.5.2
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
class RemovedInWagtail10Warning(DeprecationWarning):
|
||||
class RemovedInWagtail11Warning(DeprecationWarning):
|
||||
pass
|
||||
|
||||
|
||||
class RemovedInWagtail11Warning(PendingDeprecationWarning):
|
||||
class RemovedInWagtail12Warning(PendingDeprecationWarning):
|
||||
pass
|
||||
|
|
|
@ -22,7 +22,7 @@ from taggit.managers import TaggableManager
|
|||
from wagtail.wagtailadmin import widgets
|
||||
from wagtail.wagtailcore.models import Page
|
||||
from wagtail.wagtailcore.utils import camelcase_to_underscore, resolve_model_string
|
||||
from wagtail.utils.deprecation import RemovedInWagtail11Warning
|
||||
from wagtail.utils.deprecation import RemovedInWagtail12Warning
|
||||
|
||||
|
||||
# Form field properties to override whenever we encounter a model field
|
||||
|
@ -670,7 +670,7 @@ class InlinePanel(object):
|
|||
"InlinePanel no longer needs to be passed a model parameter. "
|
||||
"InlinePanel({classname}, '{relname}') should be changed to InlinePanel('{relname}')".format(
|
||||
classname=args[0].__name__, relname=self.relation_name
|
||||
), RemovedInWagtail11Warning, stacklevel=2)
|
||||
), RemovedInWagtail12Warning, stacklevel=2)
|
||||
else:
|
||||
raise TypeError("InlinePanel() takes exactly 1 argument (%d given)" % len(args))
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@ from wagtail.wagtailcore.models import Page, Site
|
|||
from wagtail.wagtailcore.fields import RichTextArea
|
||||
from wagtail.tests.models import PageChooserModel, EventPageChooserModel, EventPage, EventPageSpeaker, SimplePage
|
||||
from wagtail.tests.utils import WagtailTestUtils
|
||||
from wagtail.utils.deprecation import RemovedInWagtail11Warning
|
||||
from wagtail.utils.deprecation import RemovedInWagtail12Warning
|
||||
|
||||
|
||||
class TestGetFormForModel(TestCase):
|
||||
|
@ -532,9 +532,9 @@ class TestInlinePanel(TestCase, WagtailTestUtils):
|
|||
with warnings.catch_warnings(record=True) as w:
|
||||
SpeakerInlinePanelDef = InlinePanel(EventPage, 'speakers', label="Speakers")
|
||||
|
||||
# Check that a RemovedInWagtail11Warning has been triggered
|
||||
# Check that a RemovedInWagtail12Warning has been triggered
|
||||
self.assertEqual(len(w), 1)
|
||||
self.assertTrue(issubclass(w[-1].category, RemovedInWagtail11Warning))
|
||||
self.assertTrue(issubclass(w[-1].category, RemovedInWagtail12Warning))
|
||||
self.assertTrue("InlinePanel(EventPage, 'speakers') should be changed to InlinePanel('speakers')" in str(w[-1].message))
|
||||
|
||||
SpeakerInlinePanel = SpeakerInlinePanelDef.bind_to_model(EventPage)
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
__version__ = '0.9.dev0'
|
||||
__version__ = '1.0b1'
|
||||
default_app_config = 'wagtail.wagtailcore.apps.WagtailCoreAppConfig'
|
||||
|
|
|
@ -4,7 +4,7 @@ from django import forms
|
|||
from django.forms.models import modelform_factory
|
||||
from django.utils.translation import ugettext as _
|
||||
|
||||
from wagtail.utils.deprecation import RemovedInWagtail11Warning
|
||||
from wagtail.utils.deprecation import RemovedInWagtail12Warning
|
||||
from wagtail.wagtailimages.formats import get_image_formats
|
||||
from wagtail.wagtailimages.fields import WagtailImageField
|
||||
|
||||
|
@ -29,7 +29,7 @@ def get_image_form(model):
|
|||
"Custom image models without an 'admin_form_fields' attribute are now deprecated. "
|
||||
"Add admin_form_fields = (tuple of field names) to {classname}".format(
|
||||
classname=model.__name__
|
||||
), RemovedInWagtail11Warning, stacklevel=2)
|
||||
), RemovedInWagtail12Warning, stacklevel=2)
|
||||
|
||||
return modelform_factory(
|
||||
model,
|
||||
|
|
|
@ -12,7 +12,7 @@ from django.db import models
|
|||
|
||||
from taggit.forms import TagField, TagWidget
|
||||
|
||||
from wagtail.utils.deprecation import RemovedInWagtail11Warning
|
||||
from wagtail.utils.deprecation import RemovedInWagtail12Warning
|
||||
from wagtail.tests.models import CustomImageWithAdminFormFields, CustomImageWithoutAdminFormFields
|
||||
from wagtail.tests.utils import WagtailTestUtils
|
||||
from wagtail.wagtailimages.utils import generate_signature, verify_signature
|
||||
|
@ -283,9 +283,9 @@ class TestGetImageForm(TestCase, WagtailTestUtils):
|
|||
with warnings.catch_warnings(record=True) as w:
|
||||
form = get_image_form(CustomImageWithoutAdminFormFields)
|
||||
|
||||
# Check that a RemovedInWagtail11Warning has been triggered
|
||||
# Check that a RemovedInWagtail12Warning has been triggered
|
||||
self.assertEqual(len(w), 1)
|
||||
self.assertTrue(issubclass(w[-1].category, RemovedInWagtail11Warning))
|
||||
self.assertTrue(issubclass(w[-1].category, RemovedInWagtail12Warning))
|
||||
self.assertTrue("Add admin_form_fields = (tuple of field names) to CustomImageWithoutAdminFormFields" in str(w[-1].message))
|
||||
|
||||
# All fields, including the not editable one should be on the form
|
||||
|
|
Ładowanie…
Reference in New Issue