Skip to content

Instantly share code, notes, and snippets.

@adamn
Created October 14, 2016 18:20
Show Gist options
  • Save adamn/1dbfde14f541d818c046430561a0decb to your computer and use it in GitHub Desktop.
Save adamn/1dbfde14f541d818c046430561a0decb to your computer and use it in GitHub Desktop.
Adding user to stream broken (maybe the user doesn't exist on staging db but does on elastic search?)
IntegrityError at /streams/7d654571-6b07-4855-879a-b99c18d804e6/add_access
(1452, 'Cannot add or update a child row: a foreign key constraint fails (`centr_staging`.`stream_streamaccess`, CONSTRAINT `stream_streamaccess_user_id_80bda50c_fk_user_user_id` FOREIGN KEY (`user_id`) REFERENCES `user_user` (`id`))')
Request Method: POST
Request URL: https://staging-centr.factr.com/streams/7d654571-6b07-4855-879a-b99c18d804e6/add_access
Django Version: 1.10.2
Python Executable: /var/virtualenvs/centr/bin/python3.5
Python Version: 3.5.2
Python Path: ['/var/www/releases/1476387964-7b83f922', '/var/virtualenvs/centr/bin', '/var/virtualenvs/centr/src/newspaper3k', '/var/virtualenvs/centr/lib/python3.5', '/var/virtualenvs/centr/lib/python3.5/plat-x86_64-linux-gnu', '/var/virtualenvs/centr/lib/python3.5/lib-dynload', '/usr/lib/python3.5', '/usr/lib/python3.5/plat-x86_64-linux-gnu', '/var/virtualenvs/centr/lib/python3.5/site-packages', '/var/virtualenvs/centr/lib/python3.5/site-packages/newrelic-2.70.0.51', '/var/www/releases/1476387964-7b83f922']
Server time: Fri, 14 Oct 2016 18:18:49 +0000
Installed Applications:
['django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'corsheaders',
'notifications',
'password_reset',
'rest_framework',
'rest_framework.authtoken',
'rest_framework_cache',
'storages',
'apps.base',
'apps.item',
'apps.monitor',
'apps.source',
'apps.stream',
'apps.user',
'apps.geo',
'apps.tag',
'apps.oauth',
'social.apps.django_app.default',
'health_check',
'health_check_cache',
'health_check_storage']
Installed Middleware:
['apps.base.middleware.StripCookieForExtensionMiddleware',
'corsheaders.middleware.CorsMiddleware',
'django.middleware.security.SecurityMiddleware',
'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']
Traceback:
File "/var/virtualenvs/centr/lib/python3.5/site-packages/django/db/models/query.py" in get_or_create
473. return self.get(**lookup), False
File "/var/virtualenvs/centr/lib/python3.5/site-packages/django/db/models/query.py" in get
385. self.model._meta.object_name
During handling of the above exception (StreamAccess matching query does not exist.), another exception occurred:
File "/var/virtualenvs/centr/lib/python3.5/site-packages/django/db/backends/utils.py" in execute
64. return self.cursor.execute(sql, params)
File "/var/virtualenvs/centr/lib/python3.5/site-packages/django/db/backends/mysql/base.py" in execute
110. return self.cursor.execute(query, args)
File "/var/virtualenvs/centr/lib/python3.5/site-packages/MySQLdb/cursors.py" in execute
250. self.errorhandler(self, exc, value)
File "/var/virtualenvs/centr/lib/python3.5/site-packages/MySQLdb/connections.py" in defaulterrorhandler
42. raise errorvalue
File "/var/virtualenvs/centr/lib/python3.5/site-packages/MySQLdb/cursors.py" in execute
247. res = self._query(query)
File "/var/virtualenvs/centr/lib/python3.5/site-packages/MySQLdb/cursors.py" in _query
411. rowcount = self._do_query(q)
File "/var/virtualenvs/centr/lib/python3.5/site-packages/MySQLdb/cursors.py" in _do_query
374. db.query(q)
File "/var/virtualenvs/centr/lib/python3.5/site-packages/MySQLdb/connections.py" in query
270. _mysql.connection.query(self, query)
The above exception ((1452, 'Cannot add or update a child row: a foreign key constraint fails (`centr_staging`.`stream_streamaccess`, CONSTRAINT `stream_streamaccess_user_id_80bda50c_fk_user_user_id` FOREIGN KEY (`user_id`) REFERENCES `user_user` (`id`))')) was the direct cause of the following exception:
File "/var/virtualenvs/centr/lib/python3.5/site-packages/django/core/handlers/exception.py" in inner
39. response = get_response(request)
File "/var/virtualenvs/centr/lib/python3.5/site-packages/django/core/handlers/base.py" in _legacy_get_response
249. response = self._get_response(request)
File "/var/virtualenvs/centr/lib/python3.5/site-packages/django/core/handlers/base.py" in _get_response
187. response = self.process_exception_by_middleware(e, request)
File "/var/virtualenvs/centr/lib/python3.5/site-packages/django/core/handlers/base.py" in _get_response
185. response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/var/virtualenvs/centr/lib/python3.5/site-packages/django/views/decorators/csrf.py" in wrapped_view
58. return view_func(*args, **kwargs)
File "/var/virtualenvs/centr/lib/python3.5/site-packages/rest_framework/viewsets.py" in view
87. return self.dispatch(request, *args, **kwargs)
File "/var/virtualenvs/centr/lib/python3.5/site-packages/rest_framework/views.py" in dispatch
474. response = self.handle_exception(exc)
File "/var/virtualenvs/centr/lib/python3.5/site-packages/rest_framework/views.py" in handle_exception
434. self.raise_uncaught_exception(exc)
File "/var/virtualenvs/centr/lib/python3.5/site-packages/rest_framework/views.py" in dispatch
471. response = handler(request, *args, **kwargs)
File "/var/www/releases/1476387964-7b83f922/apps/stream/views.py" in add_access
219. stream.add_access(target_user_id, role)
File "/var/www/releases/1476387964-7b83f922/apps/stream/models.py" in add_access
198. user_id=target_user)
File "/var/virtualenvs/centr/lib/python3.5/site-packages/django/db/models/manager.py" in manager_method
85. return getattr(self.get_queryset(), name)(*args, **kwargs)
File "/var/virtualenvs/centr/lib/python3.5/site-packages/django/db/models/query.py" in get_or_create
475. return self._create_object_from_params(lookup, params)
File "/var/virtualenvs/centr/lib/python3.5/site-packages/django/db/models/query.py" in _create_object_from_params
513. six.reraise(*exc_info)
File "/var/virtualenvs/centr/lib/python3.5/site-packages/django/utils/six.py" in reraise
686. raise value
File "/var/virtualenvs/centr/lib/python3.5/site-packages/django/db/models/query.py" in _create_object_from_params
505. obj = self.create(**params)
File "/var/virtualenvs/centr/lib/python3.5/site-packages/django/db/models/query.py" in create
399. obj.save(force_insert=True, using=self.db)
File "/var/virtualenvs/centr/lib/python3.5/site-packages/django/db/models/base.py" in save
796. force_update=force_update, update_fields=update_fields)
File "/var/virtualenvs/centr/lib/python3.5/site-packages/django/db/models/base.py" in save_base
824. updated = self._save_table(raw, cls, force_insert, force_update, using, update_fields)
File "/var/virtualenvs/centr/lib/python3.5/site-packages/django/db/models/base.py" in _save_table
908. result = self._do_insert(cls._base_manager, using, fields, update_pk, raw)
File "/var/virtualenvs/centr/lib/python3.5/site-packages/django/db/models/base.py" in _do_insert
947. using=using, raw=raw)
File "/var/virtualenvs/centr/lib/python3.5/site-packages/django/db/models/manager.py" in manager_method
85. return getattr(self.get_queryset(), name)(*args, **kwargs)
File "/var/virtualenvs/centr/lib/python3.5/site-packages/django/db/models/query.py" in _insert
1045. return query.get_compiler(using=using).execute_sql(return_id)
File "/var/virtualenvs/centr/lib/python3.5/site-packages/django/db/models/sql/compiler.py" in execute_sql
1054. cursor.execute(sql, params)
File "/var/virtualenvs/centr/lib/python3.5/site-packages/django/db/backends/utils.py" in execute
79. return super(CursorDebugWrapper, self).execute(sql, params)
File "/var/virtualenvs/centr/lib/python3.5/site-packages/django/db/backends/utils.py" in execute
64. return self.cursor.execute(sql, params)
File "/var/virtualenvs/centr/lib/python3.5/site-packages/django/db/utils.py" in __exit__
94. six.reraise(dj_exc_type, dj_exc_value, traceback)
File "/var/virtualenvs/centr/lib/python3.5/site-packages/django/utils/six.py" in reraise
685. raise value.with_traceback(tb)
File "/var/virtualenvs/centr/lib/python3.5/site-packages/django/db/backends/utils.py" in execute
64. return self.cursor.execute(sql, params)
File "/var/virtualenvs/centr/lib/python3.5/site-packages/django/db/backends/mysql/base.py" in execute
110. return self.cursor.execute(query, args)
File "/var/virtualenvs/centr/lib/python3.5/site-packages/MySQLdb/cursors.py" in execute
250. self.errorhandler(self, exc, value)
File "/var/virtualenvs/centr/lib/python3.5/site-packages/MySQLdb/connections.py" in defaulterrorhandler
42. raise errorvalue
File "/var/virtualenvs/centr/lib/python3.5/site-packages/MySQLdb/cursors.py" in execute
247. res = self._query(query)
File "/var/virtualenvs/centr/lib/python3.5/site-packages/MySQLdb/cursors.py" in _query
411. rowcount = self._do_query(q)
File "/var/virtualenvs/centr/lib/python3.5/site-packages/MySQLdb/cursors.py" in _do_query
374. db.query(q)
File "/var/virtualenvs/centr/lib/python3.5/site-packages/MySQLdb/connections.py" in query
270. _mysql.connection.query(self, query)
Exception Type: IntegrityError at /streams/7d654571-6b07-4855-879a-b99c18d804e6/add_access
Exception Value: (1452, 'Cannot add or update a child row: a foreign key constraint fails (`centr_staging`.`stream_streamaccess`, CONSTRAINT `stream_streamaccess_user_id_80bda50c_fk_user_user_id` FOREIGN KEY (`user_id`) REFERENCES `user_user` (`id`))')
Request information:
USER: adam@factr.com
GET: No GET data
POST: No POST data
FILES: No FILES data
COOKIES: No cookie data
META:
CONTENT_LENGTH = '70'
CONTENT_TYPE = 'application/json;charset=UTF-8'
HTTP_ACCEPT = 'application/json, text/plain, */*'
HTTP_ACCEPT_ENCODING = 'gzip, deflate'
HTTP_ACCEPT_LANGUAGE = 'en-us'
HTTP_AUTHORIZATION = 'Token 8199c61126a32f293300cb7292f5bd0a91746d25'
HTTP_CONNECTION = 'close'
HTTP_HOST = 'staging-centr.factr.com'
HTTP_ORIGIN = 'https://staging.factr.com'
HTTP_REFERER = 'https://staging.factr.com/stream/clinton-hill'
HTTP_USER_AGENT = 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_1) AppleWebKit/602.2.11 (KHTML, like Gecko) Version/10.0.1 Safari/602.2.11'
HTTP_X_FORWARDED_FOR = '100.33.126.217, 172.31.46.228'
HTTP_X_FORWARDED_PORT = '443'
HTTP_X_FORWARDED_PROTO = 'https'
HTTP_X_NGINX_PROXY = 'true'
HTTP_X_REAL_IP = '172.31.46.228'
PATH_INFO = '/streams/7d654571-6b07-4855-879a-b99c18d804e6/add_access'
QUERY_STRING = ''
RAW_URI = '/streams/7d654571-6b07-4855-879a-b99c18d804e6/add_access'
REMOTE_ADDR = '127.0.0.1'
REMOTE_PORT = '32912'
REQUEST_METHOD = 'POST'
SCRIPT_NAME = ''
SERVER_NAME = '127.0.0.1'
SERVER_PORT = '8000'
SERVER_PROTOCOL = 'HTTP/1.0'
SERVER_SOFTWARE = 'gunicorn/19.6.0'
gunicorn.socket = <socket.socket fd=39, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=0, laddr=('127.0.0.1', 8000), raddr=('127.0.0.1', 32912)>
wsgi.errors = <gunicorn.http.wsgi.WSGIErrorsWrapper object at 0x7f656c158748>
wsgi.file_wrapper = ''
wsgi.input = <gunicorn.http.body.Body object at 0x7f656c158400>
wsgi.multiprocess = True
wsgi.multithread = False
wsgi.run_once = False
wsgi.url_scheme = 'https'
wsgi.version =
Settings:
Using settings module centr.settings
ABSOLUTE_URL_OVERRIDES = {}
ADMINS = [('Factr devs', 'dev@factr.com')]
ALLOWED_HOSTS = ['*']
APPEND_SLASH = False
AUTHENTICATION_BACKENDS =
AUTH_PASSWORD_VALIDATORS = '********************'
AUTH_USER_MODEL = 'user.User'
AUTOSLUG_SLUGIFY_FUNCTION = 'apps.base.text.slugify'
AWS_ACCESS_KEY_ID = '********************'
AWS_SECRET_ACCESS_KEY = '********************'
AWS_SNS_SOURCE_TOPIC = 'arn:aws:sns:us-east-1:718761708656:rss_source_stage'
AWS_STORAGE_BUCKET_NAME = 'staging-factr'
BASE_DIR = '/var/www/releases/1476387964-7b83f922'
BASE_URL = 'https://staging.factr.com'
BROKER_URL = 'sqs://AKIAIPN5RIQDFAFOZNTA:RL5ApIB%2BWjjJxcDF%2BYgg1oYxt14fMwUUnZYjgsx5@'
CACHES = {'default': {'BACKEND': 'django_redis.cache.RedisCache', 'LOCATION': 'redis://redis-staging.dmsvay.0001.use1.cache.amazonaws.com/1', 'OPTIONS': {'CLIENT_CLASS': 'django_redis.client.DefaultClient'}}}
CACHE_COUNT_TIMEOUT = 1800
CACHE_MACHINE_USE_REDIS = True
CACHE_MIDDLEWARE_ALIAS = 'default'
CACHE_MIDDLEWARE_KEY_PREFIX = '********************'
CACHE_MIDDLEWARE_SECONDS = 600
CELERY_ACCEPT_CONTENT = ['pickle']
CELERY_QUEUES =
CELERY_RESULT_SERIALIZER = 'pickle'
CELERY_ROUTES = {'apps.stream.tasks.export_stream_data': 'export-stream-staging', 'apps.source.tasks.add_source_items_now': 'add-source-items-high-staging', 'apps.monitor.tasks.generate_recent_stream_monitor_activity': 'monitor-staging', 'apps.source.tasks.add_source_items': 'add-source-items-staging'}
CELERY_TASK_SERIALIZER = 'pickle'
CONFIGURATION = 'centr.settings.Staging'
CORS_ORIGIN_WHITELIST =
CSRF_COOKIE_AGE = 31449600
CSRF_COOKIE_DOMAIN = None
CSRF_COOKIE_HTTPONLY = False
CSRF_COOKIE_NAME = 'csrftoken'
CSRF_COOKIE_PATH = '/'
CSRF_COOKIE_SECURE = False
CSRF_FAILURE_VIEW = 'django.views.csrf.csrf_failure'
CSRF_HEADER_NAME = 'HTTP_X_CSRFTOKEN'
CSRF_TRUSTED_ORIGINS = []
DATABASES = {'default': {'ATOMIC_REQUESTS': False, 'AUTOCOMMIT': True, 'TEST': {'MIRROR': None, 'NAME': None, 'COLLATION': None, 'CHARSET': None}, 'TIME_ZONE': None, 'CONN_MAX_AGE': 0, 'USER': 'factr', 'ENGINE': 'django.db.backends.mysql', 'NAME': 'centr_staging', 'PASSWORD': '********************', 'OPTIONS': {}, 'HOST': 'factr-staging.cvhklzd4ei5t.us-east-1.rds.amazonaws.com', 'PORT': 3306}}
DATABASE_ROUTERS = []
DATA_UPLOAD_MAX_MEMORY_SIZE = 2621440
DATA_UPLOAD_MAX_NUMBER_FIELDS = 1000
DATETIME_FORMAT = 'N j, Y, P'
DATETIME_INPUT_FORMATS = ['%Y-%m-%d %H:%M:%S', '%Y-%m-%d %H:%M:%S.%f', '%Y-%m-%d %H:%M', '%Y-%m-%d', '%m/%d/%Y %H:%M:%S', '%m/%d/%Y %H:%M:%S.%f', '%m/%d/%Y %H:%M', '%m/%d/%Y', '%m/%d/%y %H:%M:%S', '%m/%d/%y %H:%M:%S.%f', '%m/%d/%y %H:%M', '%m/%d/%y']
DATE_FORMAT = 'N j, Y'
DATE_INPUT_FORMATS = ['%Y-%m-%d', '%m/%d/%Y', '%m/%d/%y', '%b %d %Y', '%b %d, %Y', '%d %b %Y', '%d %b, %Y', '%B %d %Y', '%B %d, %Y', '%d %B %Y', '%d %B, %Y']
DEBUG = True
DEBUG_PROPAGATE_EXCEPTIONS = False
DECIMAL_SEPARATOR = '.'
DEFAULT_CHARSET = 'utf-8'
DEFAULT_CONTENT_TYPE = 'text/html'
DEFAULT_EXCEPTION_REPORTER_FILTER = 'django.views.debug.SafeExceptionReporterFilter'
DEFAULT_FILE_STORAGE = 'storages.backends.s3boto.S3BotoStorage'
DEFAULT_FROM_EMAIL = 'Factr Staging <staging@factr.com>'
DEFAULT_INDEX_TABLESPACE = ''
DEFAULT_TABLESPACE = ''
DIGEST_FROM_EMAIL = 'Factr Staging Digest <staging@factr.com>'
DISALLOWED_USER_AGENTS = []
DOTENV_LOADED = None
ELASTICSEARCH_ENDPOINT = 'https://centr:o7jj412nqqq1wr42xv@c57911c1def74b432f578ad73c148aac.us-east-1.aws.found.io:9243'
ELASTICSEARCH_TIMEOUT = 20
EMAIL_BACKEND = 'sgbackend.SendGridBackend'
EMAIL_HOST = 'localhost'
EMAIL_HOST_PASSWORD = '********************'
EMAIL_HOST_USER = ''
EMAIL_PORT = 25
EMAIL_SSL_CERTFILE = None
EMAIL_SSL_KEYFILE = '********************'
EMAIL_SUBJECT_PREFIX = '[Django] '
EMAIL_TIMEOUT = None
EMAIL_USE_SSL = False
EMAIL_USE_TLS = False
ENVIRONMENT = 'staging'
FACTR_EMPLOYEE_EMAILS =
FILE_CHARSET = 'utf-8'
FILE_UPLOAD_DIRECTORY_PERMISSIONS = None
FILE_UPLOAD_HANDLERS = ['django.core.files.uploadhandler.TemporaryFileUploadHandler']
FILE_UPLOAD_MAX_MEMORY_SIZE = 2621440
FILE_UPLOAD_PERMISSIONS = None
FILE_UPLOAD_TEMP_DIR = None
FIRST_DAY_OF_WEEK = 0
FIXTURE_DIRS = []
FORCE_SCRIPT_NAME = None
FORMAT_MODULE_PATH = None
HOSTNAME = 'centr-staging-app1'
IGNORABLE_404_URLS = []
IMGIX_SIGN_KEY = '********************'
IMGIX_URL = 'factr-url.imgix.net'
IMGIX_URL2 = 'https://factr-staging.imgix.net'
INSTALLED_APPS = ['django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', 'corsheaders', 'notifications', 'password_reset', 'rest_framework', 'rest_framework.authtoken', 'rest_framework_cache', 'storages', 'apps.base', 'apps.item', 'apps.monitor', 'apps.source', 'apps.stream', 'apps.user', 'apps.geo', 'apps.tag', 'apps.oauth', 'social.apps.django_app.default', 'health_check', 'health_check_cache', 'health_check_storage']
INTERNAL_IPS = []
JINJA_ENVIRONMENT = <jinja2.environment.Environment object at 0x7f6571307b38>
LANGUAGES = [('af', 'Afrikaans'), ('ar', 'Arabic'), ('ast', 'Asturian'), ('az', 'Azerbaijani'), ('bg', 'Bulgarian'), ('be', 'Belarusian'), ('bn', 'Bengali'), ('br', 'Breton'), ('bs', 'Bosnian'), ('ca', 'Catalan'), ('cs', 'Czech'), ('cy', 'Welsh'), ('da', 'Danish'), ('de', 'German'), ('dsb', 'Lower Sorbian'), ('el', 'Greek'), ('en', 'English'), ('en-au', 'Australian English'), ('en-gb', 'British English'), ('eo', 'Esperanto'), ('es', 'Spanish'), ('es-ar', 'Argentinian Spanish'), ('es-co', 'Colombian Spanish'), ('es-mx', 'Mexican Spanish'), ('es-ni', 'Nicaraguan Spanish'), ('es-ve', 'Venezuelan Spanish'), ('et', 'Estonian'), ('eu', 'Basque'), ('fa', 'Persian'), ('fi', 'Finnish'), ('fr', 'French'), ('fy', 'Frisian'), ('ga', 'Irish'), ('gd', 'Scottish Gaelic'), ('gl', 'Galician'), ('he', 'Hebrew'), ('hi', 'Hindi'), ('hr', 'Croatian'), ('hsb', 'Upper Sorbian'), ('hu', 'Hungarian'), ('ia', 'Interlingua'), ('id', 'Indonesian'), ('io', 'Ido'), ('is', 'Icelandic'), ('it', 'Italian'), ('ja', 'Japanese'), ('ka', 'Georgian'), ('kk', 'Kazakh'), ('km', 'Khmer'), ('kn', 'Kannada'), ('ko', 'Korean'), ('lb', 'Luxembourgish'), ('lt', 'Lithuanian'), ('lv', 'Latvian'), ('mk', 'Macedonian'), ('ml', 'Malayalam'), ('mn', 'Mongolian'), ('mr', 'Marathi'), ('my', 'Burmese'), ('nb', 'Norwegian Bokmål'), ('ne', 'Nepali'), ('nl', 'Dutch'), ('nn', 'Norwegian Nynorsk'), ('os', 'Ossetic'), ('pa', 'Punjabi'), ('pl', 'Polish'), ('pt', 'Portuguese'), ('pt-br', 'Brazilian Portuguese'), ('ro', 'Romanian'), ('ru', 'Russian'), ('sk', 'Slovak'), ('sl', 'Slovenian'), ('sq', 'Albanian'), ('sr', 'Serbian'), ('sr-latn', 'Serbian Latin'), ('sv', 'Swedish'), ('sw', 'Swahili'), ('ta', 'Tamil'), ('te', 'Telugu'), ('th', 'Thai'), ('tr', 'Turkish'), ('tt', 'Tatar'), ('udm', 'Udmurt'), ('uk', 'Ukrainian'), ('ur', 'Urdu'), ('vi', 'Vietnamese'), ('zh-hans', 'Simplified Chinese'), ('zh-hant', 'Traditional Chinese')]
LANGUAGES_BIDI = ['he', 'ar', 'fa', 'ur']
LANGUAGE_CODE = 'en-us'
LANGUAGE_COOKIE_AGE = None
LANGUAGE_COOKIE_DOMAIN = None
LANGUAGE_COOKIE_NAME = 'django_language'
LANGUAGE_COOKIE_PATH = '/'
LOCALE_PATHS = []
LOGGING = {'version': 1, 'loggers': {'default': {'handlers': ['console'], 'level': 'DEBUG', 'propagate': False}}, 'disable_existing_loggers': True, 'filters': [], 'handlers': {'console': {'formatter': 'standard', 'class': 'logging.StreamHandler', 'level': 'DEBUG'}}, 'formatters': {'colored': {'()': 'colorlog.ColoredFormatter', 'format': '%(log_color)s%(message)s'}, 'standard': {'datefmt': '%d/%b/%Y %H:%M:%S', 'format': '[%(asctime)s] [%(levelname)s] %(message)s'}, 'simple': {'format': '%(levelname)s %(message)s'}}}
LOGGING_CONFIG = 'logging.config.dictConfig'
LOGIN_REDIRECT_URL = '/accounts/profile/'
LOGIN_URL = '/accounts/login/'
LOGOUT_REDIRECT_URL = None
MANAGERS = []
MAPZEN_API_KEY = '********************'
MEDIA_ROOT = ''
MEDIA_URL = ''
MESSAGE_STORAGE = 'django.contrib.messages.storage.fallback.FallbackStorage'
MIDDLEWARE = None
MIDDLEWARE_CLASSES = ['apps.base.middleware.StripCookieForExtensionMiddleware', 'corsheaders.middleware.CorsMiddleware', 'django.middleware.security.SecurityMiddleware', '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']
MIGRATION_MODULES = {}
MONTH_DAY_FORMAT = 'F j'
NUMBER_GROUPING = 0
PASSWORD_HASHERS = '********************'
PASSWORD_RESET_TIMEOUT_DAYS = '********************'
PREPEND_WWW = False
REDIS_BACKEND = 'redis://redis-staging.dmsvay.0001.use1.cache.amazonaws.com/1'
REST_FRAMEWORK = {'DEFAULT_PERMISSION_CLASSES': ['rest_framework.permissions.IsAuthenticated'], 'SEARCH_PARAM': 'q', 'PAGE_SIZE': 10, 'DEFAULT_AUTHENTICATION_CLASSES': ('rest_framework.authentication.TokenAuthentication', 'rest_framework.authentication.SessionAuthentication'), 'ORDERING_PARAM': 'sort', 'URL_FIELD_NAME': 'canonical_url', 'DEFAULT_PAGINATION_CLASS': 'apps.base.pagination.FactrPagination', 'DEFAULT_RENDERER_CLASSES': ('rest_framework.renderers.JSONRenderer',)}
REST_FRAMEWORK_CACHE = {'DEFAULT_CACHE_TIMEOUT': 3600}
ROOT_URLCONF = 'centr.urls'
SECRET_KEY = '********************'
SECURE_BROWSER_XSS_FILTER = False
SECURE_CONTENT_TYPE_NOSNIFF = False
SECURE_HSTS_INCLUDE_SUBDOMAINS = False
SECURE_HSTS_SECONDS = 0
SECURE_PROXY_SSL_HEADER = None
SECURE_REDIRECT_EXEMPT = []
SECURE_SSL_HOST = None
SECURE_SSL_REDIRECT = False
SENDGRID_ADDUSER_TEMPLATE = '3f1cc4b9-bc9b-4c54-bd22-4e36d3cc5b70'
SENDGRID_API_KEY = '********************'
SENDGRID_BASIC_TEMPLATE = 'a3c1ea53-8b8d-43d2-b015-5894c2a57cac'
SENDGRID_TARGET_TEMPLATE = '1ae79cb1-748b-4a36-9e02-5135386e1187'
SERVER_EMAIL = 'root@localhost'
SESSION_CACHE_ALIAS = 'default'
SESSION_COOKIE_AGE = 1209600
SESSION_COOKIE_DOMAIN = None
SESSION_COOKIE_HTTPONLY = True
SESSION_COOKIE_NAME = 'sessionid'
SESSION_COOKIE_PATH = '/'
SESSION_COOKIE_SECURE = False
SESSION_ENGINE = 'django.contrib.sessions.backends.db'
SESSION_EXPIRE_AT_BROWSER_CLOSE = False
SESSION_FILE_PATH = None
SESSION_SAVE_EVERY_REQUEST = False
SESSION_SERIALIZER = 'django.contrib.sessions.serializers.JSONSerializer'
SETTINGS_MODULE = 'centr.settings'
SHORT_DATETIME_FORMAT = 'm/d/Y P'
SHORT_DATE_FORMAT = 'm/d/Y'
SHOULD_SEND_EMAIL = True
SIGNING_BACKEND = 'django.core.signing.TimestampSigner'
SILENCED_SYSTEM_CHECKS = []
SOCIAL_AUTH_FIELD_SELECTORS = ['emailAddress']
SOCIAL_AUTH_GOOGLE_OAUTH2_KEY = '********************'
SOCIAL_AUTH_GOOGLE_OAUTH2_SECRET = '********************'
SOCIAL_AUTH_LINKEDIN_OAUTH2_FIELD_SELECTORS = ['email-address', 'headline', 'location', 'positions', 'picture-urls::(original)']
SOCIAL_AUTH_LINKEDIN_OAUTH2_KEY = '********************'
SOCIAL_AUTH_LINKEDIN_OAUTH2_SECRET = '********************'
SOCIAL_AUTH_LINKEDIN_OAUTH_2_SCOPE = ['r_basicprofile', 'r_emailaddress']
SOCIAL_AUTH_PIPELINE =
SOCIAL_AUTH_USERNAME_IS_FULL_EMAIL = True
SOCIAL_AUTH_USER_FIELDS = ['email', 'first_name', 'last_name']
STATICFILES_DIRS = []
STATICFILES_FINDERS = ['django.contrib.staticfiles.finders.FileSystemFinder', 'django.contrib.staticfiles.finders.AppDirectoriesFinder']
STATICFILES_STORAGE = 'django.contrib.staticfiles.storage.StaticFilesStorage'
STATIC_ROOT = '/var/www/releases/1476387964-7b83f922/static'
STATIC_URL = '/static/'
TEMPLATES = [{'APP_DIRS': True, 'BACKEND': 'django.template.backends.django.DjangoTemplates', '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']}, 'DIRS': []}]
TEST_NON_SERIALIZED_APPS = []
TEST_RUNNER = 'django.test.runner.DiscoverRunner'
THOUSAND_SEPARATOR = ','
TIME_FORMAT = 'P'
TIME_INPUT_FORMATS = ['%H:%M:%S', '%H:%M:%S.%f', '%H:%M']
TIME_ZONE = 'UTC'
USE_ETAGS = False
USE_I18N = True
USE_L10N = True
USE_THOUSAND_SEPARATOR = False
USE_TZ = True
USE_X_FORWARDED_HOST = False
USE_X_FORWARDED_PORT = False
WSGI_APPLICATION = 'centr.wsgi.application'
X_FRAME_OPTIONS = 'SAMEORIGIN'
YEAR_MONTH_FORMAT = 'F Y'
You're seeing this error because you have DEBUG = True in your
Django settings file. Change that to False, and Django will
display a standard page generated by the handler for this status code.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment