Merge branch 'develop' of git://github.com/melinath/philo into develop
authorJoseph Spiros <joseph.spiros@ithinksw.com>
Wed, 29 Jun 2011 11:17:55 +0000 (07:17 -0400)
committerJoseph Spiros <joseph.spiros@ithinksw.com>
Wed, 29 Jun 2011 11:17:55 +0000 (07:17 -0400)
* 'develop' of git://github.com/melinath/philo:
  Added ordering to NavigationItemInline and removed the extra form a) because it's unnecessary, and b) to avoid grappelli issue #337.
  Added memoization to TargetURLModel.get_target_url.
  Removed unnecessary foreign key evaluations from MultiView subclass urlpatterns and get_reverse_params().
  Cleaned up shipherd docs.
  Added philo-root reversal caching to Node.construct_url.
  Pre-fetching the contentreference content may have been premature optimization. Switched to a simple fetch, as it seems to run slightly faster.
  Minor correction to ContainerContext.get_references().
  Moved caching of contentlets/contentreferences so that (for example) a page with only contentlets will not fetch content references. Set up content references to pre-fetch all related pieces of content to save queries.
  Removed template container discovery in favor of (potentially) larger queries.
  Moved container finding code into philo/utils/templates, along with template utils from philo/utils. Moved initial container fetching code for container template tags from ContainerContext.__init__ to ContainerNode.get_container_content and cleaned things up a little.
  Removed automatic interpretation of contentlets as templates as per issue #168.
  Tweaked the FeedView API slightly to pass the object from get_object into the get_items callback. This allows for FeedViews that do not have FK relationships to the object.
  A fair amount of effort is wasted getting container content. Initial commit of a branch to fix that. There's a large speedup on container fetching, but the container detection algorithm is prohibitively slow. Should be sped up or bypassed.
  Added link generation example, and fixed a typo.
  Note about context processor in Shipherd tutorial.

1  2 
philo/contrib/waldo/models.py

@@@ -164,13 -164,13 +164,13 @@@ class PasswordMultiView(LoginMultiView)
        def urlpatterns(self):
                urlpatterns = super(PasswordMultiView, self).urlpatterns
                
-               if self.password_reset_page and self.password_reset_confirmation_email and self.password_set_page:
+               if self.password_reset_page_id and self.password_reset_confirmation_email_id and self.password_set_page_id:
                        urlpatterns += patterns('',
                                url(r'^password/reset$', csrf_protect(self.password_reset), name='password_reset'),
                                url(r'^password/reset/(?P<uidb36>\w+)/(?P<token>[^/]+)$', self.password_reset_confirm, name='password_reset_confirm'),
                        )
                
-               if self.password_change_page:
+               if self.password_change_page_id:
                        urlpatterns += patterns('',
                                url(r'^password/change$', csrf_protect(self.login_required(self.password_change)), name='password_change'),
                        )
@@@ -329,7 -329,7 +329,7 @@@ class RegistrationMultiView(PasswordMul
        @property
        def urlpatterns(self):
                urlpatterns = super(RegistrationMultiView, self).urlpatterns
-               if self.register_page and self.register_confirmation_email:
+               if self.register_page_id and self.register_confirmation_email_id:
                        urlpatterns += patterns('',
                                url(r'^register$', csrf_protect(self.register), name='register'),
                                url(r'^register/(?P<uidb36>\w+)/(?P<token>[^/]+)$', self.register_confirm, name='register_confirm')
@@@ -421,11 -421,11 +421,11 @@@ class AccountMultiView(RegistrationMult
        @property
        def urlpatterns(self):
                urlpatterns = super(AccountMultiView, self).urlpatterns
-               if self.manage_account_page:
+               if self.manage_account_page_id:
                        urlpatterns += patterns('',
                                url(r'^account$', self.login_required(self.account_view), name='account'),
                        )
-               if self.email_change_confirmation_email:
+               if self.email_change_confirmation_email_id:
                        urlpatterns += patterns('',
                                url(r'^account/email/(?P<uidb36>\w+)/(?P<email>[\w.]+[+][\w.]+)/(?P<token>[^/]+)$', self.email_change_confirm, name='email_change_confirm')
                        )
                                        self.set_requirement_redirect(request, redirect=request.path)
                                        redirect = self.reverse('account', node=request.node)
                                else:
 -                                      redirect = node.get_absolute_url()
 +                                      redirect = request.node.get_absolute_url()
                                return HttpResponseRedirect(redirect)
                        return view(request, *args, **kwargs)