Django provides several views that you can use for handling login, logout, and password management. These make use of the built-in auth forms but you can pass in your own forms as well. Django provides no default template for the authentication views-however, the following template context is documented for each view.
There are different methods to implement these views in your project, however, the easiest and most common way is to include the provided URLconf in Django.contrib.auth.urls
in your own URLconf, for example:
urlpatterns = [url('^', include('Django.contrib.auth.urls'))]
This will make each of the views available at a default URL (detailed in next section).
The built-in views all return a TemplateResponse
instance, which allows you to easily customize the response data before rendering. Most built-in authentication views provide a URL name for easier reference.