From: Joseph Spiros Date: Wed, 29 Jun 2011 11:17:55 +0000 (-0400) Subject: Merge branch 'develop' of git://github.com/melinath/philo into develop X-Git-Tag: philo-0.9.1^2~5 X-Git-Url: http://git.ithinksw.org/philo.git/commitdiff_plain/93eac03cfd379525b6cf41825b14a5d37cd03505?hp=-c Merge branch 'develop' of git://github.com/melinath/philo into develop * '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. --- 93eac03cfd379525b6cf41825b14a5d37cd03505 diff --combined philo/contrib/waldo/models.py index 72c81c3,93b5add..025cfbe --- a/philo/contrib/waldo/models.py +++ b/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\w+)/(?P[^/]+)$', 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\w+)/(?P[^/]+)$', 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\w+)/(?P[\w.]+[+][\w.]+)/(?P[^/]+)$', self.email_change_confirm, name='email_change_confirm') ) @@@ -501,7 -501,7 +501,7 @@@ 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)