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 497100a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions 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
4 changes: 2 additions & 2 deletions widgy/site.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
from django.conf import settings
from django.conf.urls import patterns, url
from django.core.urlresolvers import reverse
from django.core.exceptions import PermissionDenied
Expand Down Expand Up @@ -191,5 +192,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 497100a

Please sign in to comment.