Skip to content

Commit

Permalink
Gavin's original change
Browse files Browse the repository at this point in the history
  • Loading branch information
zmetcalf committed Sep 18, 2014
1 parent 917cc93 commit 69b77c0
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 10 deletions.
8 changes: 0 additions & 8 deletions widgy/contrib/page_builder/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,6 @@ class Meta:
draggable = False
deletable = False

@property
def owner_class(self):
if 'widgy.contrib.widgy_mezzanine' in settings.INSTALLED_APPS:
from widgy.contrib.widgy_mezzanine.models import WidgyPage
return getattr(settings, 'WIDGY_MEZZANINE_PAGE_MODEL', WidgyPage)
else:
return getattr(settings, 'WIDGY_MEZZANINE_PAGE_MODEL', None)

@classmethod
def valid_child_of(cls, content, obj=None):
return False
Expand Down
3 changes: 1 addition & 2 deletions widgy/site.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,5 +191,4 @@ def admin_scss_files(self):
])

def valid_root_of(self, owner_class, root_class, root_choices):
return issubclass(root_class, root_choices) and \
root_class().owner_class == owner_class
return issubclass(root_class, root_choices)

0 comments on commit 69b77c0

Please sign in to comment.