Move views/routes to seperate files

This commit is contained in:
Michał Gdula 2023-04-06 16:22:56 +00:00
parent 7eb4355b52
commit f33842ead3
13 changed files with 150 additions and 116 deletions

View file

@ -114,11 +114,16 @@ def create_app(test_config=None):
from gallery import auth
app.register_blueprint(auth.blueprint)
# Load the different routes
from gallery.views import api, groups, routing, settings
# Load the API
from gallery import api
app.register_blueprint(api.blueprint)
app.register_blueprint(groups.blueprint)
app.register_blueprint(routing.blueprint)
# Load the different views
from gallery.views import index, image, group, settings, profile
app.register_blueprint(index.blueprint)
app.register_blueprint(image.blueprint)
app.register_blueprint(group.blueprint)
app.register_blueprint(profile.blueprint)
app.register_blueprint(settings.blueprint)
# Log to file that the app has started