initialization

This commit is contained in:
zhangwenwen 2021-08-10 10:13:50 +08:00
parent 76f87ef1c7
commit 44d8561ed0
6 changed files with 25 additions and 0 deletions

1
.gitignore vendored
View File

@ -1,3 +1,4 @@
.idea
# ---> Python
# Byte-compiled / optimized / DLL files
__pycache__/

8
app/__init__.py Normal file
View File

@ -0,0 +1,8 @@
from flask import Flask, render_template
from flask_bootstrap import Bootstrap
from flask_moment import Moment
def create_app(config_name):
app = Flask(__name__)
return app

3
app/main/__init__.py Normal file
View File

@ -0,0 +1,3 @@
from flask import Blueprint
main = Blueprint('main', __name__)

0
config.py Normal file
View File

13
manage.py Normal file
View File

@ -0,0 +1,13 @@
import os
from app import create_app
from flask_script import Manager,Shell
app=create_app(os.getenv('FLASK_CONFIG') or 'default')
manager=Manager(app)
if __name__ == '__main__':
manager.run()

0
tests/__init__.py Normal file
View File