kopia lustrzana https://github.com/wagtail/wagtail
Move the two RemovedInWagtail11Warnings to Wagtail 1.2 instead.
Scheduling these for deprecation in 1.1 was an error, since the changes were only made in 1.0 and our standard policy is to remove deprecated features two versions later.pull/1429/merge
rodzic
5d4c42060e
commit
ec763be010
|
@ -7,7 +7,7 @@ from wagtail.wagtailadmin.userbar import EditPageItem, AddPageItem, ApproveModer
|
|||
from wagtail.wagtailcore import hooks
|
||||
from wagtail.wagtailcore.models import Page, PageRevision
|
||||
|
||||
from wagtail.utils.deprecation import RemovedInWagtail11Warning
|
||||
from wagtail.utils.deprecation import RemovedInWagtail12Warning
|
||||
|
||||
|
||||
@permission_required('wagtailadmin.access_admin', raise_exception=True)
|
||||
|
@ -17,7 +17,7 @@ def for_frontend(request, page_id):
|
|||
AddPageItem(Page.objects.get(id=page_id)),
|
||||
]
|
||||
|
||||
# TODO: Remove in 1.1 release
|
||||
# TODO: Remove in 1.2 release
|
||||
run_deprecated_edit_bird_hook(request, items)
|
||||
|
||||
for fn in hooks.get_hooks('construct_wagtail_userbar'):
|
||||
|
@ -44,7 +44,7 @@ def for_moderation(request, revision_id):
|
|||
RejectModerationEditPageItem(PageRevision.objects.get(id=revision_id)),
|
||||
]
|
||||
|
||||
# TODO: Remove in 1.1 release
|
||||
# TODO: Remove in 1.2 release
|
||||
run_deprecated_edit_bird_hook(request, items)
|
||||
|
||||
for fn in hooks.get_hooks('construct_wagtail_userbar'):
|
||||
|
@ -68,5 +68,5 @@ def run_deprecated_edit_bird_hook(request, items):
|
|||
|
||||
warnings.warn(
|
||||
"The 'construct_wagtail_edit_bird' hook has been renamed to 'construct_wagtail_userbar'."
|
||||
"Please update function '%s' in '%s'." % (fn.__name__, fn.__module__), RemovedInWagtail11Warning
|
||||
"Please update function '%s' in '%s'." % (fn.__name__, fn.__module__), RemovedInWagtail12Warning
|
||||
)
|
||||
|
|
|
@ -31,7 +31,7 @@ from wagtail.wagtailsearch import index
|
|||
from wagtail.wagtailimages.rect import Rect
|
||||
from wagtail.wagtailimages.exceptions import InvalidFilterSpecError
|
||||
from wagtail.wagtailadmin.utils import get_object_usage
|
||||
from wagtail.utils.deprecation import RemovedInWagtail11Warning
|
||||
from wagtail.utils.deprecation import RemovedInWagtail12Warning
|
||||
|
||||
|
||||
class SourceImageIOError(IOError):
|
||||
|
@ -336,7 +336,7 @@ class Filter(models.Model):
|
|||
warnings.warn(
|
||||
"The IMAGE_COMPRESSION_QUALITY setting has been renamed to "
|
||||
"WAGTAILIMAGES_JPEG_QUALITY. Please update your settings.",
|
||||
RemovedInWagtail11Warning)
|
||||
RemovedInWagtail12Warning)
|
||||
else:
|
||||
quality = 85
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue