Mercurial > public > sg101
comparison podcast/views.py @ 1086:aa43db10c565
Convert podcast app to V3 design.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Tue, 03 May 2016 20:58:15 -0500 |
parents | e932f2ecd4a7 |
children |
comparison
equal
deleted
inserted
replaced
1085:16e190fa6ef8 | 1086:aa43db10c565 |
---|---|
60 except Channel.DoesNotExist: | 60 except Channel.DoesNotExist: |
61 channel = None | 61 channel = None |
62 | 62 |
63 return render(request, 'podcast/index.html', { | 63 return render(request, 'podcast/index.html', { |
64 'channel': channel, | 64 'channel': channel, |
65 'V3_DESIGN': True, | |
65 }) | 66 }) |
66 | 67 |
67 | 68 |
68 def detail(request, id): | 69 def detail(request, id): |
69 podcast = get_object_or_404(Item.objects.select_related(), pk = id) | 70 podcast = get_object_or_404(Item.objects.select_related(), pk=id) |
70 | 71 |
71 ext = get_ext_from_url(podcast.enclosure_url) | 72 ext = get_ext_from_url(podcast.enclosure_url) |
72 alt_ext = None | 73 alt_ext = None |
73 if podcast.alt_enclosure_url: | 74 if podcast.alt_enclosure_url: |
74 alt_ext = get_ext_from_url(podcast.alt_enclosure_url) | 75 alt_ext = get_ext_from_url(podcast.alt_enclosure_url) |
81 'podcast': podcast, | 82 'podcast': podcast, |
82 'ext': ext, | 83 'ext': ext, |
83 'alt_ext': alt_ext, | 84 'alt_ext': alt_ext, |
84 'jplayer_media': jplayer_media, | 85 'jplayer_media': jplayer_media, |
85 'jplayer_supplied': jplayer_supplied, | 86 'jplayer_supplied': jplayer_supplied, |
87 'V3_DESIGN': True, | |
86 }) | 88 }) |
87 | 89 |
88 | 90 |
89 def feed(request): | 91 def feed(request): |
90 try: | 92 try: |