diff --git a/gallery/__init__.py b/gallery/__init__.py index 9060fe9..20636c5 100644 --- a/gallery/__init__.py +++ b/gallery/__init__.py @@ -68,6 +68,7 @@ def create_app(test_config=None): js = Bundle('js/*.js', output='gen/packed.js') assets.register('js_all', js) + # Error handlers @app.errorhandler(403) @app.errorhandler(404) @app.errorhandler(405) @@ -89,8 +90,10 @@ def create_app(test_config=None): app.register_blueprint(routing.blueprint) app.register_blueprint(settings.blueprint) + # Log to file that the app has started logging.info('Gallery started successfully!') + # Initialize extensions and return app assets.init_app(app) cache.init_app(app) compress.init_app(app) diff --git a/gallery/auth.py b/gallery/auth.py index 31c694c..0c7cfa4 100644 --- a/gallery/auth.py +++ b/gallery/auth.py @@ -164,4 +164,4 @@ def logout(): """ logging.info('User (%s) %s logged out', session.get('user_id'), g.user.username) session.clear() - return redirect(url_for('index')) + return redirect(url_for('gallery.index')) diff --git a/gallery/static/js/login.js b/gallery/static/js/login.js index 78bf5ca..0f1b4d6 100644 --- a/gallery/static/js/login.js +++ b/gallery/static/js/login.js @@ -3,7 +3,7 @@ function showLogin() { popUpShow( 'idk what to put here, just login please', 'Need an account? Register!', - '', + '', '