Skip to content

Commit

Permalink
Revert "move everthing to __call__"
Browse files Browse the repository at this point in the history
This reverts commit 0a0adf1.
  • Loading branch information
thet committed Feb 26, 2015
1 parent fb13be1 commit 52e45df
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
4 changes: 2 additions & 2 deletions plone/app/contenttypes/browser/collection.py
Expand Up @@ -7,11 +7,11 @@

class CollectionView(FolderView):

def __call__(self):
def __init__(self, *args, **kwargs):
super(CollectionView, self).__init__(*args, **kwargs)
context = aq_inner(self.context)
self.collection_behavior = ICollection(context)
self.b_size = self.collection_behavior.item_count
return super(CollectionView, self).__call__()

def results(self, **kwargs):
return self.collection_behavior.results(
Expand Down
6 changes: 2 additions & 4 deletions plone/app/contenttypes/browser/folder.py
Expand Up @@ -19,9 +19,8 @@

class FolderView(BrowserView):

def __call__(self):
context = self.context
request = self.request
def __init__(self, context, request):
super(FolderView, self).__init__(context, request)

registry = getUtility(IRegistry)

Expand Down Expand Up @@ -63,7 +62,6 @@ def __call__(self):
self.b_size = int(b_size) if b_size is not None else limit_display
b_start = getattr(self.request, 'b_start', None)
self.b_start = int(b_start) if b_start is not None else 0
return super(FolderView, self).__call__()

def _content_filter(self):
content_filter = getattr(self.request, 'contentFilter', None)
Expand Down

0 comments on commit 52e45df

Please sign in to comment.