X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/4b86e623b0ff7a5a53bdb29df06eab039ebe4e1e..48a8d1d73adefae7f0c58015494ce956d7cd70df:/src/club/views.py?ds=sidebyside diff --git a/src/club/views.py b/src/club/views.py index e6dc996e0..1393b9693 100644 --- a/src/club/views.py +++ b/src/club/views.py @@ -13,8 +13,8 @@ class ClubView(TemplateView): class JoinView(CreateView): - template_name = 'club/membership_form.html' form_class = ScheduleForm + template_name = 'club/membership_form.html' def get(self, request): schedule = get_active_schedule(request.user) @@ -23,7 +23,7 @@ class JoinView(CreateView): else: return super(JoinView, self).get(request) - def get_context_data(self): + def get_context_data(self, form=None): c = super(JoinView, self).get_context_data() c['membership'] = getattr(self.request.user, 'membership', None) return c @@ -42,6 +42,10 @@ class JoinView(CreateView): return retval +class AppJoinView(JoinView): + template_name = 'club/membership_form_app.html' + + class ScheduleView(View): def get(self, request, key): schedule = models.Schedule.objects.get(key=key)