Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class FilmDetailView(DetailView):
- model = Film
- queryset = Film.objects.get(id=id)
- def get_context_data(self, **kwargs):
- # Call the base implementation first to get a context
- context = super(FilmDetailView, self).get_context_data(**kwargs)
- # Add in a QuerySet of all the books
- context['film'] = Film.objects.get(id=id)
- return context
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement