tags:

views:

982

answers:

1

I'm new to Django and in bouncing around the framework over the past few days I haven't been able to figure out how to properly install the django.contrib.auth app in my project. Well, installing is probably not the right word, but configuring it for my purposes.

What I'm truly hoping to do is extend the built-in classes to simply create registration and login forms, since my User class is working just fine from terminal.

In settings.py I have django.contrib.auth in my INSTALLED_APPS. I also have installed the Authentication Middleware and Sessions Middleware.

I can also clearly see in Django.contrib.auth.views and Django.contrib.auth.forms where the registration and authentication handlers are.

My problem, it seems, since I'm new to the framework, is properly including these files in my project and generating the HTML forms for registration and login.

(As in, do I need to include these Auth files in my app's forms.py? What do I need to model that hasn't already been modeled for me? And finally, since I can see in Django.contrib.auth.views a need for a registration directory with HTML templates, how can I get these all communicating with each other properly?)

Any help would be much appreciated.

Figured out the problem. Just needed to take a deep breath and follow Django's URL Conf conventions. Example: (r'^accounts/login/$', 'django.contrib.auth.views.login'),

+3  A: 

James Bennet's django-registration is an excellent helper application used for a common registration / login pattern.

Prairiedogg