コード例 #1
0
ファイル: settings.py プロジェクト: pu55yf3r/pretalx
import os
from contextlib import suppress
from urllib.parse import urlparse
from pathlib import Path

from django.contrib.messages import constants as messages
from django.utils.crypto import get_random_string
from django.utils.translation import gettext_lazy as _
from pkg_resources import iter_entry_points

from pretalx import __version__
from pretalx.common.settings.config import build_config
from pretalx.common.settings.utils import log_initial


config, CONFIG_FILES = build_config()
CONFIG = config

##
# This settings file is rather lengthy. It follows this structure:
# Directories, Apps, Url, Security, Databases, Logging, Email, Caching (and Sessions)
# I18n, Auth, Middleware, Templates and Staticfiles, External Apps
#
# Search for "## {AREA} SETTINGS" to navigate this file
##

DEBUG = config.getboolean("site", "debug")


## DIRECTORY SETTINGS
BASE_DIR = Path(config.get("filesystem", "base"))
コード例 #2
0
ファイル: settings.py プロジェクト: zuntrax/pretalx
import os
import sys
from contextlib import suppress
from urllib.parse import urlparse

import django
from django.contrib.messages import constants as messages  # NOQA
from django.utils.crypto import get_random_string
from django.utils.translation import ugettext_lazy as _  # NOQA
from pkg_resources import iter_entry_points

from pretalx.common.settings.config import build_config
from pretalx.common.settings.utils import log_initial

config, config_files = build_config()
CONFIG = config

##
# This settings file is rather lengthy. It follows this structure:
# Directories, Apps, Url, Security, Databases, Logging, Email, Caching (and Sessions)
# I18n, Auth, Middleware, Templates and Staticfiles, External Apps
#
# Search for "## {AREA} SETTINGS" to navigate this file
##

DEBUG = config.getboolean('site', 'debug')

## DIRECTORY SETTINGS
BASE_DIR = config.get('filesystem', 'base')
DATA_DIR = config.get('filesystem',
                      'data',