Update for public https://habr.com/post/421887/
This commit is contained in:
9
deploy/config/__init__.py
Normal file
9
deploy/config/__init__.py
Normal file
@@ -0,0 +1,9 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: UTF-8 -*-
|
||||
|
||||
__author__ = 'RemiZOffAlex'
|
||||
__copyright__ = '(c) RemiZOffAlex'
|
||||
__license__ = 'MIT'
|
||||
__email__ = 'remizoffalex@mail.ru'
|
||||
|
||||
CONFIG = 'config.demo'
|
||||
33
deploy/config/demo.py
Normal file
33
deploy/config/demo.py
Normal file
@@ -0,0 +1,33 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: UTF-8 -*-
|
||||
|
||||
__author__ = 'RemiZOffAlex'
|
||||
__copyright__ = '(c) RemiZOffAlex'
|
||||
__license__ = 'MIT'
|
||||
__email__ = 'remizoffalex@mail.ru'
|
||||
|
||||
import os
|
||||
import sys
|
||||
|
||||
# Конфигурация
|
||||
DEBUG = True
|
||||
SQLDEBUG = False
|
||||
|
||||
SESSION_COOKIE_NAME = 'myapp'
|
||||
SESSION_TYPE = 'filesystem'
|
||||
|
||||
TITLE = 'Проект'
|
||||
|
||||
DIR_BASE = '/'.join(os.path.dirname(os.path.abspath(__file__)).split('/')[:-1])
|
||||
DIR_DATA = DIR_BASE + '/data'
|
||||
DIR_FILES = DIR_DATA + '/files'
|
||||
SQLALCHEMY_DATABASE_URI = 'sqlite:///' + DIR_DATA + '/db.sqlite3'
|
||||
# Генерировать можно утилитой pwgen
|
||||
# Пример:
|
||||
# pwgen -sy 64
|
||||
SECRET_KEY = '''0123456789'''
|
||||
|
||||
# Логирование
|
||||
LOG_FILE = DIR_DATA + '/myapp.log'
|
||||
LONG_LOG_FORMAT = '%(asctime)s - [%(name)s.%(levelname)s] [%(threadName)s, %(module)s.%(funcName)s@%(lineno)d] %(message)s'
|
||||
LOG_FILE_SIZE = 128 # Размер файла лога в МБ
|
||||
Reference in New Issue
Block a user