Answer the question
In order to leave comments, you need to log in
How to connect login form to django?
I want to see the login/password authorization form by accessing 127.0.0.1:8000/login. What to write where? I looked at the documentation, but found only the backend. Did you search badly?
INSTALLED_APPS = (
'grappelli',
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'django.contrib.flatpages',
'django.contrib.sites'
...
)
MIDDLEWARE_CLASSES = (
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
'django.contrib.flatpages.middleware.FlatpageFallbackMiddleware',
)
Answer the question
In order to leave comments, you need to log in
See documentation: https://docs.djangoproject.com/en/1.7/topics/auth/...
Django already contains the view you need. You need to:
- Set the path to it in urls.py
- Make an HTML template for it
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question