Advertisement
Guest User

Untitled

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