Exemple #1
0
    def form_valid(self, form):
        fc = FileControl()
        imgfile = form.cleaned_data["image"]
        file_id = fc.save(imgfile)

        self.success_url = reverse("confirm_registration_document",
                                   kwargs={"file_id": file_id})

        return FormView.form_valid(self, form)
Exemple #2
0
 def __init__(self, **kwargs):
     FormView.__init__(self, **kwargs)
     self.fc = FileControl()