diff --git a/aula/Group/routes.py b/aula/Group/routes.py index 5ebb345..8914330 100644 --- a/aula/Group/routes.py +++ b/aula/Group/routes.py @@ -7,9 +7,6 @@ Group = Blueprint('Group', __name__) @Group.route("/groups/index", methods=['GET']) def index(): - user = select_users_by_id(5000) - groups = user.get_groups() - for group in groups: - print(group.name) - return "hej" + groups = current_user.get_groups() + return render_template('groups.html', groups=groups) diff --git a/aula/templates/groups.html b/aula/templates/groups.html new file mode 100644 index 0000000..cb74dd5 --- /dev/null +++ b/aula/templates/groups.html @@ -0,0 +1,6 @@ +{% extends "layout.html" %} +{% block content %} + {% for group in groups %} +

{{ group.name }}

+ {% endfor %} +{% endblock content %}