-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.py
More file actions
42 lines (30 loc) · 869 Bytes
/
config.py
File metadata and controls
42 lines (30 loc) · 869 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
__title__ = ''
__author__ = 'eliefly'
__mtime__ = '11/8/16'
"""
import os
basedir = os.path.abspath(os.path.dirname(__file__))
class Config:
SECRET_KEY = os.environ.get('SECRET_KEY') or 'hard to guess string'
AVATER_FORMAT = list(['jpg', 'png', 'jpeg', 'bmp'])
STATIC_FOLDER = '/home/eliefly/PycharmProjects/NovBlog/app/static'
POSTS_PER_PAGE = 15
@staticmethod
def init_app(app):
pass
class DevelopmentConfig(Config):
DEBUG = True
MONGODB_SETTINGS = {'db': 'NovBlogDev',
'ALIAS':'default',
'host': 'localhost'}
class TestingConfig(Config):
TESTING = True
MONGODB_SETTINGS = {'DB': 'NovBlogTest'}
config = {
'development': DevelopmentConfig,
'testing': TestingConfig,
'default': DevelopmentConfig
}