Fixes #3934: Error on OAI-PMH list request.
[wolnelektury.git] / src / club / views.py
index e6dc996..1393b96 100644 (file)
@@ -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)