14 lines
347 B
Python
14 lines
347 B
Python
from django.utils import timezone
|
|
from django.views.generic.list import ListView
|
|
|
|
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
|