Commit c6235d2f authored by Andreas Fischer's avatar Andreas Fischer
Browse files

Prepared template engine exercise

parent eaea9904
<!DOCTYPE html>
<html lang="en">
<title>APT Django exercise</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="">
<script src=""></script>
<script src=""></script>
<script src=""></script>
<div class="jumbotron text-center">
<nav class="navbar navbar-expand-sm bg-dark navbar-dark">
<a class="navbar-brand" href="/">Overview</a>
<div class="collapse navbar-collapse" id="collapsibleNavbar">
<ul class="navbar-nav">
<li class="nav-item">
<a class="nav-link" href="/professors">Professors</a>
<li class="nav-item">
<a class="nav-link" href="/students">Students</a>
<li class="nav-item">
<a class="nav-link" href="/exams">Exams</a>
<li class="nav-item">
<a class="nav-link" href="/admin">Admin</a>
<div class="container">
<h2>[[ Instead of this text, there should be the main content of the page ]]</h2>
from django.urls import path
from . import views
urlpatterns = [
path('', views.index, name='index'),
path('professors', views.professors, name='professors'),
path('students', views.students, name='students'),
path('exams', views.exams, name='exams'),
from django.shortcuts import render
from .models import *
# Create your views here.
def index(request):
context = {}
return render(request, 'university/index.html', context)
def professors(request):
context = {}
return render(request, 'university/professors.html', context)
def students(request):
context = {}
return render(request, 'university/students.html', context)
def exams(request):
context = {}
return render(request, 'university/exams.html', context)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment