Hello,
I'm trying to modify the default registration forms.py by adding in more fields.
Currently it's like that:
=================================================
keyword_info = {
"queryset" : Keyword.objects.all(),
}
class RegistrationForm(forms.Form):
username = forms.RegexField(regex=r'^\w+$',
max_length=30,
widget=forms.TextInput(attrs=attrs_dict),
label=_(u'username'))
email = forms.EmailField(widget=forms.TextInput(attrs=dict(attrs_dict,
maxlength=75)),
label=_(u'email address'))
password1 = forms.CharField(widget=forms.PasswordInput(attrs=attrs_dict,
render_value=False),
label=_(u'password'))
password2 = forms.CharField(widget=forms.PasswordInput(attrs=attrs_dict,
render_value=False),
label=_(u'password (again)'))
keywords = forms.ChoiceField(choices=keyword_info)
label=_(u'keyword'))
=================================================
The thing is i would like keywords to be a drop down menu of keywords which are
derived from the keyword database table.
Can someone check if what i'm doing is correct?
Thank you!
Best Regards,
Stanwin Siow
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en.