views.py 410 Bytes
Newer Older
Dennis Appel's avatar
Dennis Appel committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
from django.http import HttpResponseRedirect
from django.shortcuts import render
from django.urls import reverse
from django.db.models import Prefetch
from django.views import generic

from .models import  WikiEntry, WikiExample

class IndexView(generic.ListView):
    template_name = 'wiki/index.html'
    context_object_name = 'wiki_list'

    def get_queryset(self):
        return WikiEntry.objects.all()