To add to all the helpful messages above, for forms with standard fields,
django comes loaded with inbuilt forms.

A quick scan of the source shows (django.contrib.auth.forms) following
inbuilt forms:

AdminPasswordChangeForm
AuthenticationForm
PasswordChangeForm
PasswordResetForm
SetPasswordForm
UserChangeForm
*UserCreationForm        *(Similar to RegistrationForm of your example.)

Also, if you need to, eventually, you may as well extend the above forms, to
add/remove fields.
While we are at it, worth mentioning, the django.contrib.auth.views also
contains views for all standard operations, like login, register, change
password etc.

Best!

On Mon, Nov 2, 2009 at 8:09 PM, Andrew <andrew.penr...@gmail.com> wrote:

>
> Thanks Guys,
> I understand about the form issues...I was just tinkering...
> However yes it was the comma's I had at the end of the fields in my
> form. They didn't throw errors for the face its a sequence as you said
> Karen.
> Thanks Karen and David for such a quick response...
> Andrew
>
> On Nov 2, 2:08 pm, Karen Tracey <kmtra...@gmail.com> wrote:
> > On Mon, Nov 2, 2009 at 9:57 AM, David De La Harpe Golden <
> >
> >
> >
> > david.delaharpe.gol...@ichec.ie> wrote:
> >
> > > Karen Tracey wrote:
> > > > Commas are good on the ends of elements in a sequence, they are not
> > > > good here.
> >
> > > Indeed, a comma at the end actively denotes a kind of sequence, a
> matter
> > > of python syntax. There won't be an immediate error as "blah," means
> > > "1-element tuple" as per
> > >
> http://docs.python.org/tutorial/datastructures.html#tuples-and-sequences
> >
> > > i.e.
> > > username = forms.CharField(),
> > > means
> > > username = (forms.CharField(),)
> >
> > > So the assignment succeeds without error but django later won't do
> > > anything especially useful with username during inspection of the form
> > > definition as it'll look at it and go "nope, this ain't a django
> > > formfield, just some tuple"
> >
> > Ah, right.  Thanks for pointing out the explanation.  Doing something to
> > make Django fail loudly for stuff like this (I recall it tripping up
> someone
> > once on a model definition as well) might be worthwhile.  The current
> > no-error-but-really-confusing-results behavior is not ideal.
> >
> > Karen
> >
>


-- 
Regards,
Lakshman
becomingguru.com
lakshmanprasad.com

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

Reply via email to