Restructure our python module. A lot.

This commit is contained in:
Raphael Michel
2015-02-14 17:55:13 +01:00
parent cf18f3e200
commit 077413f41c
117 changed files with 193 additions and 163 deletions

View File

@@ -0,0 +1,21 @@
from django.shortcuts import render
from django.views.generic import ListView
from pretix.base.models import Event
class EventList(ListView):
model = Event
context_object_name = 'events'
template_name = 'pretixcontrol/events/index.html'
def get_queryset(self):
return Event.objects.current.filter(
permitted__id__exact=self.request.user.pk
).prefetch_related(
"organizer",
)
def index(request):
return render(request, 'pretixcontrol/base.html', {})