Skip to content

Instantly share code, notes, and snippets.

@mayuroks
Created October 22, 2013 20:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mayuroks/7107894 to your computer and use it in GitHub Desktop.
Save mayuroks/7107894 to your computer and use it in GitHub Desktop.
class VideoList(ListView):
model = Video
paginate_by = 15
template_name = "vid_index.html"
context_object_name = "vid_list"
def get_context_data(self, **kwargs):
context = super(VideoDetail, self).get_context_data(**kwargs)
context['big_video'] = Video.objects.filter(id=1)
# Iterate over vid_list in templates for
# surrounding/similar vids
return context
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment