Skip to content

Commit b9c8ffa

Browse files
author
Scott Clark
committed
WidgyPageAdmin cant always check for review_queue
If widgy.contrib.review_queue is not in INSTALLED_APPS, WidgyPageAdmin.has_review_queue() will throw a NameError whenever an admin tries to edit a widgy page through the admin interface.
1 parent a9e4cb9 commit b9c8ffa

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

CHANGELOG.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
Changelog
22
=========
33

4+
0.3.2 (unreleased)
5+
-----------------
6+
7+
Bugfix - Allow WidgyAdmin to check for ReviewedWidgySite without review_queue
8+
installed [Scott Clark, #265]
9+
410
0.3.1 (2014-10-01)
511
------------------
612

widgy/contrib/widgy_mezzanine/admin.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
from widgy.forms import WidgyFormMixin, VersionedWidgyWidget
2525
from widgy.contrib.widgy_mezzanine import get_widgypage_model
2626
from widgy.contrib.widgy_mezzanine.views import ClonePageView, UnpublishView
27+
from widgy.contrib.review_queue.site import ReviewedWidgySite
2728
from widgy.utils import format_html
2829
from widgy.db.fields import get_site
2930

@@ -295,7 +296,6 @@ def publish_page_on_approve(sender, instance, created, **kwargs):
295296
if 'widgy.contrib.review_queue' in settings.INSTALLED_APPS:
296297
from widgy.contrib.review_queue.admin import VersionCommitAdminBase
297298
from widgy.contrib.review_queue.models import ReviewedVersionCommit
298-
from widgy.contrib.review_queue.site import ReviewedWidgySite
299299

300300
class VersionCommitAdmin(VersionCommitAdminBase):
301301
def get_site(self):

0 commit comments

Comments
 (0)