Very initial version of checkin form

This commit is contained in:
2023-05-09 21:37:25 +01:00
parent cccb84e4dc
commit 676cee164b
7 changed files with 133 additions and 1 deletions

View File

@@ -226,3 +226,16 @@ class RAPrint(PrintView):
context = super().get_context_data(**kwargs)
context['filename'] = f"EventSpecificRiskAssessment_for_{context['object'].event.display_id}.pdf"
return context
class EventCheckIn(generic.CreateView):
model = models.EventCheckIn
template_name = 'hs/eventcheckin_form.html'
form_class = forms.EventCheckInForm
def get_context_data(self, **kwargs):
context = super().get_context_data(**kwargs)
context['event'] = models.Event.objects.get(pk=self.kwargs.get('pk'))
context['page_title'] = f'Check In to Event {context["event"].display_id}'
# get_related(context['form'], context)
return context