settings.py 529 B

123456789101112131415161718
  1. import os
  2. AUTH_MIDDLEWARE = [
  3. 'django.contrib.sessions.middleware.SessionMiddleware',
  4. 'django.contrib.auth.middleware.AuthenticationMiddleware',
  5. ]
  6. AUTH_TEMPLATES = [{
  7. 'BACKEND': 'django.template.backends.django.DjangoTemplates',
  8. 'DIRS': [os.path.join(os.path.dirname(__file__), 'templates')],
  9. 'APP_DIRS': True,
  10. 'OPTIONS': {
  11. 'context_processors': [
  12. 'django.contrib.auth.context_processors.auth',
  13. 'django.contrib.messages.context_processors.messages',
  14. ],
  15. },
  16. }]