Advertisement
Guest User

Untitled

a guest
Apr 17th, 2014
31
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.30 KB | None | 0 0
  1. AUTHENTICATION_BACKENDS = ('apps.apployment_site.auth.CustomAuth')
  2.  
  3. from django.contrib.auth import authenticate
  4. from apployment_site import *
  5. authenticate(username="username", password="password")
  6.  
  7. """Django settings for apployment project.
  8.  
  9. For more information on this file, see
  10. https://docs.djangoproject.com/en/dev/topics/settings/
  11.  
  12. For the full list of settings and their values, see
  13. https://docs.djangoproject.com/en/dev/ref/settings/
  14. """
  15.  
  16. # Build paths inside the project like this: os.path.join(BASE_DIR, ...)
  17. import os
  18. BASE_DIR = os.path.dirname(os.path.dirname(__file__))
  19.  
  20.  
  21. # Quick-start development settings - unsuitable for production
  22. # See https://docs.djangoproject.com/en/dev/howto/deployment/checklist/
  23.  
  24. # SECURITY WARNING: keep the secret key used in production secret!
  25. SECRET_KEY = '3(a=jr=tfedkqzv3f=495%0$ygxjt332(=n0&h=e2bzh(i#r*j'
  26.  
  27. # SECURITY WARNING: don't run with debug turned on in production!
  28. DEBUG = True
  29.  
  30. TEMPLATE_DEBUG = True
  31.  
  32. ALLOWED_HOSTS = []
  33.  
  34.  
  35. # Application definition
  36.  
  37. INSTALLED_APPS = (
  38. 'django.contrib.admin',
  39. 'django.contrib.auth',
  40. 'django.contrib.contenttypes',
  41. 'django.contrib.sessions',
  42. 'django.contrib.messages',
  43. 'django.contrib.staticfiles',
  44. 'apployment_site'
  45. )
  46.  
  47. MIDDLEWARE_CLASSES = (
  48. 'django.contrib.sessions.middleware.SessionMiddleware',
  49. 'django.middleware.common.CommonMiddleware',
  50. 'django.middleware.csrf.CsrfViewMiddleware',
  51. 'django.contrib.auth.middleware.AuthenticationMiddleware',
  52. 'django.contrib.messages.middleware.MessageMiddleware',
  53. 'django.middleware.clickjacking.XFrameOptionsMiddleware',
  54. )
  55.  
  56. AUTHENTICATION_BACKENDS = ('apps.apployment_site.auth.CustomAuth')
  57.  
  58. ROOT_URLCONF = 'apployment.urls'
  59.  
  60. WSGI_APPLICATION = 'apployment.wsgi.application'
  61.  
  62.  
  63. # Database
  64. # https://docs.djangoproject.com/en/dev/ref/settings/#databases
  65.  
  66. DATABASES = {
  67. 'default': {
  68. 'ENGINE': 'django.db.backends.sqlite3',
  69. 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
  70. }
  71. }
  72.  
  73. # Internationalization
  74. # https://docs.djangoproject.com/en/dev/topics/i18n/
  75.  
  76. LANGUAGE_CODE = 'en-us'
  77.  
  78. TIME_ZONE = 'UTC'
  79.  
  80. USE_I18N = True
  81.  
  82. USE_L10N = True
  83.  
  84. USE_TZ = True
  85.  
  86.  
  87. # Static files (CSS, JavaScript, Images)
  88. # https://docs.djangoproject.com/en/dev/howto/static-files/
  89.  
  90. STATIC_URL = '/static/'
  91.  
  92. AUTHENTICATION_BACKENDS = ('apps.apployment_site.auth.CustomAuth',)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement