I am new to Django and over the past few days have been bouncing around the framework. I was not able to figure out how to properly install the django.contrib.auth application in my project. Well, installation is probably not the right word, but setting it up for my purposes.
What I really hope is to extend the built-in classes to just create registration and registration forms, as my User class works fine with the terminal.
In settings.py, I have django.contrib.auth in my INSTALLED_APPS. I also installed Middleware Middleware and Session Middleware.
I can also see in Django.contrib.auth.views and Django.contrib.auth.forms where the registration and authentication handlers are located.
My problem, it seems, since I'm new to the structure, I correctly include these files in my project and generate HTML forms for registration and login.
(As in, do I need to include these Auth files in my forms.py application? What do I need for a model that has not yet been modeled for me? And finally, since I see a need for a directory in Django.contrib. Auth.views registration with HTML templates, how can I get all this to communicate with each other correctly?)
I found out the problem. You just have to follow the Django URL Conf conventions. Example: (r '^ accounts / login / $', 'django.contrib.auth.views.login'),
django forms
btw
source share