Skip to content
Snippets Groups Projects
Select Git revision
  • a497302090b71517aed9a04eff93ff847da54aa7
  • main default protected
  • feature/export-filtering
  • feature/clear-schedule-button
  • fix/responsive-cols-in-polls
  • feature/preference-polling-form
  • feature/json-export-via-rest-framework
  • feature/json-schedule-import-tests
  • fix/add-room-import-only-once
  • ak-import
  • renovate/django-simple-history-3.x
  • renovate/django-debug-toolbar-4.x
  • renovate/django-5.x
  • renovate/mysqlclient-2.x
14 results

settings_production.py

Blame
  • Forked from KIF / AKPlanning
    1073 commits behind the upstream repository.
    N. Geisler's avatar
    Nadja Geisler authored
    prevent jetbrains IDE from omitting this import
    0e3836cd
    History
    Code owners
    Assign users and groups as approvers for specific file changes. Learn more.
    settings_production.py 843 B
    """
    This is the settings file used in production.
    First, it imports all default settings, then overrides respective ones.
    Secrets are stored in and imported from an additional file, not set under version control.
    """
    
    import AKPlanning.settings_secrets as secrets
    
    # noinspection PyUnresolvedReferences
    from AKPlanning.settings import *
    
    ### SECURITY ###
    
    DEBUG = False
    
    ALLOWED_HOSTS = secrets.HOSTS
    
    SECRET_KEY = secrets.SECRET_KEY
    
    SESSION_COOKIE_SECURE = True
    CSRF_COOKIE_SECURE = True
    
    ### DATABASE ###
    
    DATABASES = {
        'default': {
            'ENGINE': 'django.db.backends.mysql',
            'HOST': 'localhost',
            'NAME': secrets.DB_NAME,
            'USER': secrets.DB_USER,
            'PASSWORD': secrets.DB_PASSWORD,
            'OPTIONS': {
                'init_command': "SET sql_mode='STRICT_TRANS_TABLES'"
            }
        }
    }
    
    # TODO: caching