Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Traceback (most recent call last):
- File "manage.py", line 10, in <module>
- execute_from_command_line(sys.argv)
- File "/Users/jeetpatel/final-tribute/venv/lib/python2.7/site-packages/django/core/management/__init__.py", line 364, in execute_from_command_line
- utility.execute()
- File "/Users/jeetpatel/final-tribute/venv/lib/python2.7/site-packages/django/core/management/__init__.py", line 356, in execute
- self.fetch_command(subcommand).run_from_argv(self.argv)
- File "/Users/jeetpatel/final-tribute/venv/lib/python2.7/site-packages/django/core/management/base.py", line 283, in run_from_argv
- self.execute(*args, **cmd_options)
- File "/Users/jeetpatel/final-tribute/venv/lib/python2.7/site-packages/django/core/management/commands/runserver.py", line 61, in execute
- super(Command, self).execute(*args, **options)
- File "/Users/jeetpatel/final-tribute/venv/lib/python2.7/site-packages/django/core/management/base.py", line 330, in execute
- output = self.handle(*args, **options)
- File "/Users/jeetpatel/final-tribute/venv/lib/python2.7/site-packages/django/core/management/commands/runserver.py", line 72, in handle
- if not settings.DEBUG and not settings.ALLOWED_HOSTS:
- File "/Users/jeetpatel/final-tribute/venv/lib/python2.7/site-packages/django/conf/__init__.py", line 56, in __getattr__
- self._setup(name)
- File "/Users/jeetpatel/final-tribute/venv/lib/python2.7/site-packages/django/conf/__init__.py", line 41, in _setup
- self._wrapped = Settings(settings_module)
- File "/Users/jeetpatel/final-tribute/venv/lib/python2.7/site-packages/django/conf/__init__.py", line 129, in __init__
- raise ImproperlyConfigured("The SECRET_KEY setting must not be empty.")
- django.core.exceptions.ImproperlyConfigured: The SECRET_KEY setting must not be empty.
- import os
- import smtplib
- BASE_DIR = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
- SITE_NAME = 'final-tribute'
- # Allow all host headers
- ALLOWED_HOSTS = []
- # AUTH_PROFILE_MODULE = 'profiles.Profile'
- LOGIN_REDIRECT_URL = '/profiles/'
- LOGIN_URL = '/'
- ADMINS = (
- ('Ab Rao', 'abc@abc.in')
- )
- MANAGERS = ADMINS
- # Quick-start development settings - unsuitable for production
- # See https://docs.djangoproject.com/en/1.8/howto/deployment/checklist/
- # Application definition
- DJANGO_APPS = (
- 'django.contrib.admin',
- 'django.contrib.auth',
- 'django.contrib.contenttypes',
- 'django.contrib.sessions',
- 'django.contrib.messages',
- 'django.contrib.staticfiles',
- 'django.contrib.postgres',
- # 'social.apps.django_app.default',
- )
- THIRD_PARTY_APPS = (
- 'rest_framework',
- 'rest_framework.authtoken',
- 'social.apps.django_app.default',
- 'micawber.contrib.mcdjango',
- 'paypal.standard.ipn',
- # 'django_extensions',
- # 'storages',
- )
- LOCAL_APPS = (
- 'core',
- 'login',
- 'profiles',
- 'tributes',
- 'testimonials',
- 'anecdotes',
- 'family_tree',
- 'timeline',
- 'gallery',
- 'general',
- 'customauth',
- 'myapp'
- )
- INSTALLED_APPS = DJANGO_APPS + THIRD_PARTY_APPS + LOCAL_APPS
- MIDDLEWARE_CLASSES = (
- 'django.middleware.security.SecurityMiddleware',
- 'whitenoise.middleware.WhiteNoiseMiddleware',
- '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',
- 'core.get_username.RequestMiddleware'
- )
- ROOT_URLCONF = 'ft.urls'
- HOST_URL = os.environ.get('HOST_URL')
- WSGI_APPLICATION = 'ft.wsgi.application'
- AUTH_USER_MODEL = 'customauth.User'
- TEMPLATES = [
- {
- 'BACKEND': 'django.template.backends.django.DjangoTemplates',
- 'DIRS': [os.path.join(BASE_DIR, 'templates'), ],
- 'APP_DIRS': True,
- 'OPTIONS': {
- 'context_processors': [
- 'django.template.context_processors.debug',
- 'django.template.context_processors.request',
- 'django.contrib.auth.context_processors.auth',
- 'django.contrib.messages.context_processors.messages',
- ],
- },
- },
- ]
- # -------------------------------------------------------
- #
- # Settings to be set in local/prod/staging setting files
- #
- # --------------------------------------------------------
- SECRET_KEY = "foo"
- DEBUG = False
- DATABASES = {
- #'default': {
- # 'ENGINE': 'django.db.backends.mysql',
- # 'NAME': 'db',
- # 'USER': 'user',
- #'PASSWORD': 'db_user',
- #'HOST': 'localhost',
- #'PORT': '3306',
- }
- }
- PAYPAL_TEST = True
- # AWS Settings
- AWS_QUERYSTRING_AUTH = False
- AWS_ACCESS_KEY_ID = ""
- AWS_SECRET_ACCESS_KEY = ""
- AWS_STORAGE_BUCKET_NAME = 'finaltribute-dev'
- MEDIA_URL = 'http://%s.s3.amazonaws.com/' % AWS_STORAGE_BUCKET_NAME
- DEFAULT_FILE_STORAGE = "storages.backends.s3boto.S3BotoStorage"
- # --------------------------------------------------------
- # Internationalization
- # https://docs.djangoproject.com/en/1.8/topics/i18n/
- LANGUAGE_CODE = 'en-us'
- TIME_ZONE = 'Asia/Kolkata'
- USE_I18N = True
- USE_L10N = True
- USE_TZ = True
- # Honor the 'X-Forwarded-Proto' header for request.is_secure()
- SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https')
- # Static files (CSS, JavaScript, Images)
- # https://docs.djangoproject.com/en/1.7/howto/static-files/
- STATIC_ROOT = os.path.join(BASE_DIR, 'static_root')
- STATIC_URL = '/static/'
- #MEDIA_ROOT = os.path.join(BASE_DIR, 'media_root')
- STATICFILES_DIRS = [
- os.path.join(BASE_DIR, 'static')
- ]
- # Rest framework settings
- REST_FRAMEWORK = {
- 'PAGINATE_BY': 10,
- 'PAGINATE_BY_PARAM': 'page_size',
- 'MAX_PAGINATE_BY': 100,
- 'DEFAULT_AUTHENTICATION_CLASSES': (
- 'rest_framework.authentication.SessionAuthentication',
- 'rest_framework.authentication.BasicAuthentication',
- ),
- 'DEFAULT_PERMISSION_CLASSES': (
- 'rest_framework.permissions.IsAdminUser',
- ),
- 'DEFAULT_FILTER_BACKENDS': (
- 'rest_framework.filters.DjangoFilterBackend',
- ),
- }
- # temp <- FIXME this needs to go into local/prod/staging files.
- EMAIL_USE_TLS = True
- EMAIL_HOST = os.environ.get('EMAIL_HOST')
- EMAIL_HOST_USER = os.environ.get('EMAIL_HOST_USER')
- EMAIL_HOST_PASSWORD = os.environ.get('EMAIL_HOST_PASSWORD')
- EMAIL_PORT = os.environ.get('EMAIL_PORT')
- BASIC_WWW_AUTHENTICATION_USERNAME = "ftwalla"
- BASIC_WWW_AUTHENTICATION_PASSWORD = "ftwalla"
- BASIC_WWW_AUTHENTICATION = True
- from __future__ import absolute_import
- #!/usr/bin/env python
- import os
- import sys
- if __name__ == "__main__":
- from django.core.management import execute_from_command_line
- execute_from_command_line(sys.argv)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement