from django.views.generic import DetailView
from django.views.generic import ListView
from django.shortcuts import redirect, render

from .forms import PresentationCreateForm
from .models import Presentation, Slide


class PresentationList(ListView):
    model = Presentation
    paginate_by = 9
    context_object_name = 'presentations'


class PresentationDetail(DetailView):
    model = Presentation
    context_object_name = 'presentation'
    template_name = 'presentation/presentation_list.html'


def presentation_create(request):
    form = PresentationCreateForm(request.POST)

    if request.method == 'POST':
        if form.is_valid():
            presentation = Presentation.objects.create(
                subject=form.cleaned_data.get('subject'),
                author=request.user,
                is_public=form.cleaned_data.get('is_public')
            )

            slide_list = request.POST.getlist('slide_list[]', [])

            for slide in slide_list:
                Slide.objects.create(
                    presentation=presentation,
                    slide_order=slide['slide_order'],
                    markdown=slide['markdown'],
                    html=slide['html'],
                )
            return redirect('presentation:list')

    context = {'form': form}

    return render(request, 'presentation/presentation_create.html', context)

@@ -126,16 +126,61 @@
 render%0A%0A
+from pure_pagination import PaginationMixin%0A%0A
 from .fo
@@ -278,16 +278,33 @@
 ionList(
+PaginationMixin, 
 ListView
@@ -393,16 +393,39 @@
 ations'%0A
+    ordering = %5B'-pk'%5D%0A
 %0A%0Aclass 

Add Ordering and PaginationMixin on Listview