Skip to content
Snippets Groups Projects
Commit d0f25858 authored by Jonathan Weth's avatar Jonathan Weth :keyboard:
Browse files

[UNTIS] All teachers can be got from [new] untisconnect api | Basic timetable...

[UNTIS] All teachers can be got from [new] untisconnect api | Basic timetable app with all teachers in a list | Untisconnector app for models/api from [UNTIS]
parent ebfb3952
No related branches found
No related tags found
No related merge requests found
{% include 'partials/header.html' %}
<main>
<ul class="collection">
{% for teacher in teachers %}
<li class="collection-item avatar">
<i class="circle">{{ teacher.shortcode }}</i>
{{ teacher.first_name }} <strong>{{ teacher.name }}</strong>
</li>
{% endfor %}
</ul>
</main>
{% include 'partials/footer.html' %}
from django.urls import path
from . import views
urlpatterns = [
path('teachers/', views.admin_teachers, name='timetable_admin_teachers')
]
from django.contrib.auth.decorators import login_required
from django.shortcuts import render
from untisconnect.api import get_all_teachers
# Create your views here.
@login_required
def admin_teachers(request):
teachers = get_all_teachers()
context = {
"teachers": teachers
}
return render(request, "timetable/admin/teachers.html", context)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment