diff --git a/platypush/backend/http/app/routes/index.py b/platypush/backend/http/app/routes/index.py index 9b9a25dd4d..eedf1a64ae 100644 --- a/platypush/backend/http/app/routes/index.py +++ b/platypush/backend/http/app/routes/index.py @@ -14,8 +14,26 @@ __routes__ = [ @index.route('/') @authenticate() -def index(): - """ Route to the main web panel """ +def index_route(): + """Route to the main web panel""" + return render_template('index.html', utils=HttpUtils) + + +@index.route('/login', methods=['GET']) +def login_route(): + """ + Login GET route. It simply renders the index template, which will + redirect to the login page if the user is not authenticated. + """ + return render_template('index.html', utils=HttpUtils) + + +@index.route('/register', methods=['GET']) +def register_route(): + """ + Register GET route. It simply renders the index template, which will + redirect to the registration page if no users are present. + """ return render_template('index.html', utils=HttpUtils)