view bns_website/videos/views.py @ 64:aaac975df679

Tweaking the bxslider's pager CSS. Before, with the images, the numbers > 9 were not centered on their circles. Made an attempt to create circles with CSS instead. The higher numbered ones have kind of a flattened top. Not sure how to fix that right now.
author Brian Neal <bgneal@gmail.com>
date Sat, 19 Nov 2011 16:32:28 -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,
        })