Advertisement
Guest User

Untitled

a guest
Apr 12th, 2018
265
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.66 KB | None | 0 0
  1. Traceback (most recent call last):
  2. File "manage.py", line 10, in <module>
  3. execute_from_command_line(sys.argv)
  4. File "/Users/jeetpatel/final-tribute/venv/lib/python2.7/site-packages/django/core/management/__init__.py", line 364, in execute_from_command_line
  5. utility.execute()
  6. File "/Users/jeetpatel/final-tribute/venv/lib/python2.7/site-packages/django/core/management/__init__.py", line 356, in execute
  7. self.fetch_command(subcommand).run_from_argv(self.argv)
  8. File "/Users/jeetpatel/final-tribute/venv/lib/python2.7/site-packages/django/core/management/base.py", line 283, in run_from_argv
  9. self.execute(*args, **cmd_options)
  10. File "/Users/jeetpatel/final-tribute/venv/lib/python2.7/site-packages/django/core/management/commands/runserver.py", line 61, in execute
  11. super(Command, self).execute(*args, **options)
  12. File "/Users/jeetpatel/final-tribute/venv/lib/python2.7/site-packages/django/core/management/base.py", line 330, in execute
  13. output = self.handle(*args, **options)
  14. File "/Users/jeetpatel/final-tribute/venv/lib/python2.7/site-packages/django/core/management/commands/runserver.py", line 72, in handle
  15. if not settings.DEBUG and not settings.ALLOWED_HOSTS:
  16. File "/Users/jeetpatel/final-tribute/venv/lib/python2.7/site-packages/django/conf/__init__.py", line 56, in __getattr__
  17. self._setup(name)
  18. File "/Users/jeetpatel/final-tribute/venv/lib/python2.7/site-packages/django/conf/__init__.py", line 41, in _setup
  19. self._wrapped = Settings(settings_module)
  20. File "/Users/jeetpatel/final-tribute/venv/lib/python2.7/site-packages/django/conf/__init__.py", line 129, in __init__
  21. raise ImproperlyConfigured("The SECRET_KEY setting must not be empty.")
  22. django.core.exceptions.ImproperlyConfigured: The SECRET_KEY setting must not be empty.
  23.  
  24. import os
  25. import smtplib
  26.  
  27. BASE_DIR = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
  28. SITE_NAME = 'final-tribute'
  29.  
  30. # Allow all host headers
  31. ALLOWED_HOSTS = []
  32.  
  33. # AUTH_PROFILE_MODULE = 'profiles.Profile'
  34. LOGIN_REDIRECT_URL = '/profiles/'
  35. LOGIN_URL = '/'
  36.  
  37. ADMINS = (
  38. ('Ab Rao', 'abc@abc.in')
  39. )
  40.  
  41. MANAGERS = ADMINS
  42.  
  43. # Quick-start development settings - unsuitable for production
  44. # See https://docs.djangoproject.com/en/1.8/howto/deployment/checklist/
  45.  
  46. # Application definition
  47.  
  48. DJANGO_APPS = (
  49. 'django.contrib.admin',
  50. 'django.contrib.auth',
  51. 'django.contrib.contenttypes',
  52. 'django.contrib.sessions',
  53. 'django.contrib.messages',
  54. 'django.contrib.staticfiles',
  55. 'django.contrib.postgres',
  56. # 'social.apps.django_app.default',
  57. )
  58.  
  59. THIRD_PARTY_APPS = (
  60. 'rest_framework',
  61. 'rest_framework.authtoken',
  62. 'social.apps.django_app.default',
  63. 'micawber.contrib.mcdjango',
  64. 'paypal.standard.ipn',
  65. # 'django_extensions',
  66. # 'storages',
  67. )
  68.  
  69. LOCAL_APPS = (
  70. 'core',
  71. 'login',
  72. 'profiles',
  73. 'tributes',
  74. 'testimonials',
  75. 'anecdotes',
  76. 'family_tree',
  77. 'timeline',
  78. 'gallery',
  79. 'general',
  80. 'customauth',
  81. 'myapp'
  82. )
  83.  
  84. INSTALLED_APPS = DJANGO_APPS + THIRD_PARTY_APPS + LOCAL_APPS
  85.  
  86. MIDDLEWARE_CLASSES = (
  87. 'django.middleware.security.SecurityMiddleware',
  88. 'whitenoise.middleware.WhiteNoiseMiddleware',
  89. 'django.contrib.sessions.middleware.SessionMiddleware',
  90. 'django.middleware.common.CommonMiddleware',
  91. 'django.middleware.csrf.CsrfViewMiddleware',
  92. 'django.contrib.auth.middleware.AuthenticationMiddleware',
  93. 'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
  94. 'django.contrib.messages.middleware.MessageMiddleware',
  95. 'django.middleware.clickjacking.XFrameOptionsMiddleware',
  96. 'core.get_username.RequestMiddleware'
  97. )
  98.  
  99. ROOT_URLCONF = 'ft.urls'
  100. HOST_URL = os.environ.get('HOST_URL')
  101. WSGI_APPLICATION = 'ft.wsgi.application'
  102. AUTH_USER_MODEL = 'customauth.User'
  103.  
  104. TEMPLATES = [
  105. {
  106. 'BACKEND': 'django.template.backends.django.DjangoTemplates',
  107. 'DIRS': [os.path.join(BASE_DIR, 'templates'), ],
  108. 'APP_DIRS': True,
  109. 'OPTIONS': {
  110. 'context_processors': [
  111. 'django.template.context_processors.debug',
  112. 'django.template.context_processors.request',
  113. 'django.contrib.auth.context_processors.auth',
  114. 'django.contrib.messages.context_processors.messages',
  115. ],
  116. },
  117. },
  118. ]
  119.  
  120. # -------------------------------------------------------
  121. #
  122. # Settings to be set in local/prod/staging setting files
  123. #
  124. # --------------------------------------------------------
  125. SECRET_KEY = "foo"
  126. DEBUG = False
  127. DATABASES = {
  128. #'default': {
  129. # 'ENGINE': 'django.db.backends.mysql',
  130. # 'NAME': 'db',
  131. # 'USER': 'user',
  132. #'PASSWORD': 'db_user',
  133. #'HOST': 'localhost',
  134. #'PORT': '3306',
  135. }
  136. }
  137.  
  138. PAYPAL_TEST = True
  139.  
  140. # AWS Settings
  141. AWS_QUERYSTRING_AUTH = False
  142. AWS_ACCESS_KEY_ID = ""
  143. AWS_SECRET_ACCESS_KEY = ""
  144. AWS_STORAGE_BUCKET_NAME = 'finaltribute-dev'
  145. MEDIA_URL = 'http://%s.s3.amazonaws.com/' % AWS_STORAGE_BUCKET_NAME
  146. DEFAULT_FILE_STORAGE = "storages.backends.s3boto.S3BotoStorage"
  147. # --------------------------------------------------------
  148.  
  149. # Internationalization
  150. # https://docs.djangoproject.com/en/1.8/topics/i18n/
  151.  
  152. LANGUAGE_CODE = 'en-us'
  153. TIME_ZONE = 'Asia/Kolkata'
  154. USE_I18N = True
  155. USE_L10N = True
  156. USE_TZ = True
  157.  
  158. # Honor the 'X-Forwarded-Proto' header for request.is_secure()
  159. SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https')
  160.  
  161. # Static files (CSS, JavaScript, Images)
  162. # https://docs.djangoproject.com/en/1.7/howto/static-files/
  163.  
  164. STATIC_ROOT = os.path.join(BASE_DIR, 'static_root')
  165. STATIC_URL = '/static/'
  166. #MEDIA_ROOT = os.path.join(BASE_DIR, 'media_root')
  167. STATICFILES_DIRS = [
  168. os.path.join(BASE_DIR, 'static')
  169. ]
  170.  
  171.  
  172. # Rest framework settings
  173. REST_FRAMEWORK = {
  174. 'PAGINATE_BY': 10,
  175. 'PAGINATE_BY_PARAM': 'page_size',
  176. 'MAX_PAGINATE_BY': 100,
  177. 'DEFAULT_AUTHENTICATION_CLASSES': (
  178. 'rest_framework.authentication.SessionAuthentication',
  179. 'rest_framework.authentication.BasicAuthentication',
  180. ),
  181. 'DEFAULT_PERMISSION_CLASSES': (
  182. 'rest_framework.permissions.IsAdminUser',
  183. ),
  184. 'DEFAULT_FILTER_BACKENDS': (
  185. 'rest_framework.filters.DjangoFilterBackend',
  186. ),
  187. }
  188.  
  189. # temp <- FIXME this needs to go into local/prod/staging files.
  190. EMAIL_USE_TLS = True
  191. EMAIL_HOST = os.environ.get('EMAIL_HOST')
  192. EMAIL_HOST_USER = os.environ.get('EMAIL_HOST_USER')
  193. EMAIL_HOST_PASSWORD = os.environ.get('EMAIL_HOST_PASSWORD')
  194. EMAIL_PORT = os.environ.get('EMAIL_PORT')
  195. BASIC_WWW_AUTHENTICATION_USERNAME = "ftwalla"
  196. BASIC_WWW_AUTHENTICATION_PASSWORD = "ftwalla"
  197. BASIC_WWW_AUTHENTICATION = True
  198.  
  199. from __future__ import absolute_import
  200.  
  201. #!/usr/bin/env python
  202. import os
  203. import sys
  204.  
  205. if __name__ == "__main__":
  206.  
  207. from django.core.management import execute_from_command_line
  208.  
  209. execute_from_command_line(sys.argv)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement