Refactoring the code

- Use Flask blueprint
- Split model and views into smaller parts
- Bug fixes
- API adjustment
This commit is contained in:
Khanh Ngo
2019-12-02 10:32:03 +07:00
parent 0b2eb0fbf8
commit 8ea00b9484
99 changed files with 15183 additions and 6386 deletions

7
run.py
View File

@@ -1,7 +1,6 @@
#!/usr/bin/env python3
from app import app
from config import PORT
from config import BIND_ADDRESS
from powerdnsadmin import create_app
if __name__ == '__main__':
app.run(debug = True, host=BIND_ADDRESS, port=PORT)
app = create_app()
app.run(debug = True, host=app.config.get('BIND_ADDRESS', '127.0.0.1'), port=app.config.get('PORT', '9191'))