mirror of
https://github.com/pretix/pretix.git
synced 2026-05-07 15:34:02 +00:00
Web-based check-in interface (#1985)
This commit is contained in:
20
src/pretix/plugins/webcheckin/views.py
Normal file
20
src/pretix/plugins/webcheckin/views.py
Normal file
@@ -0,0 +1,20 @@
|
||||
from django.views.generic import TemplateView
|
||||
|
||||
from pretix.control.permissions import EventPermissionRequiredMixin
|
||||
from pretix.helpers.countries import CachedCountries
|
||||
|
||||
|
||||
class IndexView(EventPermissionRequiredMixin, TemplateView):
|
||||
permission = ('can_change_orders', 'can_checkin_orders')
|
||||
template_name = 'pretixplugins/webcheckin/index.html'
|
||||
|
||||
def get_context_data(self, **kwargs):
|
||||
ctx = super().get_context_data(**kwargs)
|
||||
ctx['countries'] = [
|
||||
{
|
||||
'key': key,
|
||||
'value': name
|
||||
}
|
||||
for key, name in CachedCountries()
|
||||
]
|
||||
return ctx
|
||||
Reference in New Issue
Block a user