X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/e7451b87d12c06755d6dc278e72b6650f8de8b4a..323d986cab0fe909289263325d181c7b9acfc2fa:/src/club/views.py diff --git a/src/club/views.py b/src/club/views.py index e93864cab..6a5c7d725 100644 --- a/src/club/views.py +++ b/src/club/views.py @@ -60,6 +60,11 @@ class JoinView(CreateView): 'email': self.request.user.email, } + def get_form_kwargs(self): + kwargs = super().get_form_kwargs() + kwargs['referer'] = self.request.META.get('HTTP_REFERER', '') + return kwargs + def form_valid(self, form): retval = super(JoinView, self).form_valid(form) if self.request.user.is_authenticated: