django-registration view customization -


i'm using django-registration (see: https://bitbucket.org/ubernostrum/django-registration ) on 1 of projects. standard setup django-registration add code below in urls.py file

(r'^accounts/', include('registration.urls')) 

and customize templates in folder called registration.

the code above creating links registration, login , password recovery fine. in project there other functions add views if add include('registration.urls') appears have no way of customizing views containing django-registration forms.

is there way call forms used django-registrationin view can add few more things on views ?

the registration form provided registration backend. check out registration.backends.default.defaultbackend.

there's method get_form_class(request) returns registration.forms.registrationform class. have create new backend, inherit defaultbackend , override get_form_class() method return new form class.

you can pretty providing custom backend, except changing base behavior of registration app. if need radically customize views in manner providing custm backend doesn't make cut, create authn or users app , import bits django-registration find useful. can, say, keep default models , managers within registration app namespace, hook custom backend own internals in new app.


Comments

Popular posts from this blog

python - Scipy curvefit RuntimeError:Optimal parameters not found: Number of calls to function has reached maxfev = 1000 -

c# - How to add a new treeview at the selected node? -

java - netbeans "Please wait - classpath scanning in progress..." -