Erster View und erstes Template angelegt, URL /speisekarte registriert.
This commit is contained in:
@@ -1,3 +1,11 @@
|
||||
from django.shortcuts import render
|
||||
|
||||
# Create your views here.
|
||||
from django.views.generic import ListView
|
||||
from .models import Gericht
|
||||
|
||||
class GerichtListView(ListView):
|
||||
model = Gericht
|
||||
template_name = 'mensa_app/gericht_liste.html' # Der Pfad zum Template
|
||||
context_object_name = 'alle_gerichte' # Der Name, den wir im Template nutzen
|
||||
|
||||
|
||||
Reference in New Issue
Block a user