diff --git a/service.py b/service.py index eaaa24e..af5395e 100644 --- a/service.py +++ b/service.py @@ -397,6 +397,8 @@ def find_subjects(subject, count): # ================================================================================ @app.route('/edit_subcategory', methods=['GET', 'POST']) def add_sub_category(): + if not session.get('logged_in'): + return render_template('login.html') if request.method == 'POST': subject_id = request.form['subject_id'] subject_name = request.form['subject_name'] diff --git a/templates/subject.html b/templates/subject.html index 8c11bf4..a86d00e 100644 --- a/templates/subject.html +++ b/templates/subject.html @@ -59,11 +59,12 @@
You are in {{ url }}