Add list view and admin for bookmarks

This commit is contained in:
2021-03-10 08:58:23 -06:00
parent 80a1048533
commit c9d0d81972
6 changed files with 36 additions and 5 deletions

View File

@@ -1,3 +1,13 @@
from django.shortcuts import render
from django.utils import timezone
from django.views.generic.list import ListView
# Create your views here.
from .models import Bookmark
class BookmarkListView(ListView):
model = Bookmark
paginate_by = 20
def get_context_data(self, **kwargs):
context = super().get_context_data(**kwargs)
context['now'] = timezone.now()
return context