mirror of
https://github.com/pretix/pretix.git
synced 2026-05-06 15:24:02 +00:00
22 lines
523 B
Python
22 lines
523 B
Python
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', {})
|