Thursday, May 2, 2013

Registration module in 1.5.1 use of django.views.generic.simple

I am not certain how one goes about submitting changes to django. But
if I setup my virtualenv with 1.5.1 and import the registration
backend I end up getting error on importing direct_to_template. Which
can be fixed with following code change.

First, is this correct code change? Should this change be pushed to
django 1.5.X?




diff /home/snijsure/.virtualenvs/django15-broken/local/lib/python2.7/site-packages/registration/backends/default/urls.py
/home/snijsure/.virtualenvs/django15-fixed/local/lib/python2.7/site-packages/registration/backends/default/urls.py
22c22,24
< from django.views.generic.simple import direct_to_template
---
> from django.conf.urls import patterns
> from django.views.generic import TemplateView
>
30,31c32
< direct_to_template,
< {'template':
'registration/activation_complete.html'},
---
> TemplateView.as_view(template_name='registration/activation_complete.html'),
46,47c47
< direct_to_template,
< {'template':
'registration/registration_complete.html'},
---
> TemplateView.as_view(template_name='registration/registration_complete.html'),
49,51c49
< url(r'^register/closed/$',
< direct_to_template,
< {'template':
'registration/registration_closed.html'},
---
> url(r'^register/closed/$', TemplateView.as_view(template_name='registration/registration_closed.html'),

-Subodh

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate