Best way to work with sign up form validator

3 views
Skip to first unread message

Tristan

unread,
Feb 12, 2009, 12:03:49 PM2/12/09
to Pinax Users
Hi,

Whats the best way to add new fields to the pinax account signup app?
Also, whats the best way to change the javascript validator to require
existing fields like for example, the email field...?

Luigi Panzeri

unread,
Feb 14, 2009, 7:19:34 AM2/14/09
to pinax...@googlegroups.com
I don't know if it is the best but that is what i did (briefly):

in urls.py

    url(r'^f/account/signup/$', account_signup, {'form_class': forms.ExtendendSignupForm}, name="acct_signup"),

    url(r'^wrap/signup/$', views.wrap_signup, name='wrap_acct_signup'),


where ExtendedSignupForm derives from SignupForm (the pinax signup form)

then use a <form action="{% url wrap_acct_signup %}"> in your template

so in wrap_signup I call form.is_valid (it will call also the pinax one),  account.views.signup (the pinax signup default controller) and my custom actions.

In order to customize the javascript validator you have to change./override the custom template

Reply all
Reply to author
Forward
0 new messages