示例#1
0
 def get_form_class(self):
     if self.form_class is None:
         return FormData.get(self.kwargs['uuid']).form_class
示例#2
0
 def get_initial(self):
     return FormData.get(self.kwargs['uuid']).form_data
示例#3
0
 def form_valid(self, form):
     self.form_data = FormData.get(self.kwargs['uuid'])
     self.form_data.form_data = form.cleaned_data
     return http.HttpResponseRedirect(self.get_success_url())
示例#4
0
 def get_context_data(self, **kwargs):
     context = super(FormDataDetailView, self).get_context_data(**kwargs)
     context['form_data'] = FormData.get(kwargs['uuid'])
     return context