-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.py
More file actions
33 lines (26 loc) · 867 Bytes
/
Copy pathconfig.py
File metadata and controls
33 lines (26 loc) · 867 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
# -*- coding: utf-8 -*-
import os
basedir = os.path.abspath(os.path.dirname(__file__))
# Config = {
# 'SECRET_KEY':'some string',
# # 'SQLALCHEMY_DATABASE_URI':'mysql://root:123456@localhost/hello_flask',
# 'SQLALCHEMY_DATABASE_URI':'sqlite:///' + os.path.join(basedir, 'data.db'),
# 'SQLALCHEMY_COMMIT_ON_TEARDOWN':True,
# 'SQLALCHEMY_TRACK_MODIFICATIONS':True
# }
class Config:
SECRET_KEY = 'some string'
SQLALCHEMY_DATABASE_URI = 'sqlite:///' + os.path.join(basedir, 'data.db')
SQLALCHEMY_COMMIT_ON_TEARDOWN = True
SQLALCHEMY_TRACK_MODIFICATIONS = True
HelloFlask_POSTS_PER_PAGE = 10
HelloFlask_Admin = 'admin@helloflask.com'
@staticmethod
def init_app(app):
pass
class DevelopmentConfig(Config):
DEBUG = True
config = {
'default': DevelopmentConfig,
'development': DevelopmentConfig
}