view bns_website/videos/views.py @ 89:5e58c3bad4ed

Updated CSS for reviews app so the blockquote, small and a tags don't look so washed out against the new site background.
author Chris Ridgway <ckridgway@gmail.com>
date Sun, 27 Nov 2011 15:45:38 -0600
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,
        })