pythondjangodjango-contrib

Does Django ship with the authentication templates for use with the django.contrib.auth module?


I found some under the tests directory but I'm not sure if they are the right ones.

By authentication templates I mean login.htm, password_reset.htm, etc.

Some of the templates can be found at: http://devdoodles.wordpress.com/2009/02/16/user-authentication-with-django-registration/


Solution

  • No, it looks for those templates in a "registration" directory within your templates folder.

    From the docs:

    It's your responsibility to provide the login form in a template called registration/login.html by default.

    Password Reset Optional arguments:

    template_name: The full name of a template to use for displaying the password reset form. This will default to registration/password_reset_form.html if not supplied.

    Docs: login, password_reset