aab21
This commit is contained in:
commit
0508d8cd9a
53 changed files with 765 additions and 0 deletions
37
app/video/views.py
Normal file
37
app/video/views.py
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
from django.shortcuts import render, redirect, get_object_or_404
|
||||
|
||||
from . import models
|
||||
|
||||
def films(request):
|
||||
context = {}
|
||||
context['films'] = models.Film.objects.filter(public=True).order_by('created')
|
||||
return render(request, 'films.html', context)
|
||||
|
||||
def film(request, slug):
|
||||
context = {}
|
||||
context['film'] = get_object_or_404(models.Film, slug=slug)
|
||||
return render(request, 'film.html', context)
|
||||
|
||||
def film_play(request, slug):
|
||||
context = {}
|
||||
context['film'] = get_object_or_404(models.Film, slug=slug)
|
||||
return render(request, 'film_play.html', context)
|
||||
|
||||
def edits(request):
|
||||
context = {}
|
||||
context['edits'] = models.Edit.objects.filter(public=True).order_by('created')
|
||||
return render(request, 'edits.html', context)
|
||||
|
||||
def edit(request, slug):
|
||||
context = {}
|
||||
context['edit'] = get_object_or_404(models.Edit, slug=slug)
|
||||
return render(request, 'edit.html', context)
|
||||
|
||||
def edit_play(request, slug):
|
||||
context = {}
|
||||
context['edit'] = get_object_or_404(models.Edit, slug=slug)
|
||||
return render(request, 'edit_play.html', context)
|
||||
|
||||
def tv(request):
|
||||
context = {}
|
||||
return render(request, 'tv.html', context)
|
||||
Loading…
Add table
Add a link
Reference in a new issue