I'd like a simple, clean way to log users in to my django app. I've
read the book and all the docs I can find, but I still don't
understand what the right way to do this is.
Sure, I can create a form like the simple one in the django book, but
the example doesn't handle bad usernames and passwords, because it
doesn't use the results of the forms system/validators/etc.
It would seem that I could make my own form class, somehow using this
class in django.contrib.auth.forms:
class AuthenticationForm(oldforms.Manipulator):
"""
Base class for authenticating users. Extend this to get a form
that accepts
username/password logins.
Any suggestions on how to "extend this"?
A related problem may be the following: I currently have several
different pages on my site that include this "login" form. I want to
make sure I can reuse the login HTML from any location; i.e. I just
include some template code that sticks the login form in the right
spot. My form starts like this:
<form action="/accounts/login/" method="post">...
And from there I'd like the template to automatically put in error
messages for unknown users, etc. Is there an easy way to do this?
thanks in advance! I've spent far too long just trying to get user
logins working...
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---