From 06b40f51585813dfe15e1cee023312fc592bf255 Mon Sep 17 00:00:00 2001 From: NikolajDanger Date: Tue, 31 May 2022 10:01:12 +0200 Subject: [PATCH] :sparkles: --- aula/Group/routes.py | 2 +- aula/__init__.py | 9 +++------ aula/models.py | 2 +- aula/templates/groups.html | 2 +- aula/templates/layout.html | 2 +- 5 files changed, 7 insertions(+), 10 deletions(-) diff --git a/aula/Group/routes.py b/aula/Group/routes.py index 231a06d..28112ce 100644 --- a/aula/Group/routes.py +++ b/aula/Group/routes.py @@ -6,7 +6,7 @@ import sys, datetime Group = Blueprint('Group', __name__) @Group.route("/groups", methods=['GET']) -def index(): +def groups(): groups = current_user.get_groups_joinable() return render_template('groups.html', groups=groups) diff --git a/aula/__init__.py b/aula/__init__.py index 3966394..c2b9cef 100644 --- a/aula/__init__.py +++ b/aula/__init__.py @@ -15,12 +15,9 @@ login_manager.login_view = 'login' login_manager.login_message_category = 'info' from aula.Login.routes import Login -# from bank.Customer.routes import Customer -# from bank.Employee.routes import Employee -# from bank.Pax.routes import Pax +from aula.Group.routes import Group + app.register_blueprint(Login) -# app.register_blueprint(Customer) -# app.register_blueprint(Employee) -# app.register_blueprint(Pax) +app.register_blueprint(Group) #from bank import routes diff --git a/aula/models.py b/aula/models.py index f4c6d7d..5256c65 100644 --- a/aula/models.py +++ b/aula/models.py @@ -195,7 +195,7 @@ class User(tuple, UserMixin): sql_call = """ SELECT * FROM threads WHERE group_id = (SELECT groups.group_id FROM - groups INNER JOIN users_groups ON groups.group_id = users_groups.group_id + groups INNER JOIN users_groups ON groups.group_id = users_groups.group_id WHERE users_groups.user_id = %s ) """ cur.execute(sql_call, (self.group_id,)) diff --git a/aula/templates/groups.html b/aula/templates/groups.html index 106d6f6..cbdb661 100644 --- a/aula/templates/groups.html +++ b/aula/templates/groups.html @@ -6,7 +6,7 @@ {% for group in groups %}
{% endfor %} diff --git a/aula/templates/layout.html b/aula/templates/layout.html index f40fecf..8ba74c6 100644 --- a/aula/templates/layout.html +++ b/aula/templates/layout.html @@ -31,7 +31,7 @@