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)
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
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)