Mercurial > public > bravenewsurf
view bns_website/videos/views.py @ 104:f00199f1524c
Changes for running in a virtualenv on the new server jaguar.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Tue, 09 Apr 2013 21:29:30 -0500 |
parents | a0d3bc630ebd |
children |
line wrap: on
line source
""" Views for the videos application. """ import random from django.shortcuts import render from videos.models import Playlist def index(request): qs = Playlist.objects.all() videos = [] for playlist in qs: videos.extend(playlist.video_list.split(',')) random.shuffle(videos) return render(request, 'videos/index.html', { 'videos': videos, })