dynamic-django-forms
dynamic-django-forms copied to clipboard
How to elaborate data on form sending
I am trying to understand if I need to do a rest request after the form sending (with some data) how I can do using this package. Someone can help me? The readme just show how to show the data but not any elaboration on saving as example.
I tried adding in the formmodel:
def save(self, *args, **kwargs):
print(args)
print(kwargs)
return super().save(*args, **kwargs)
But the code isn't executed.
I was able to do it on the FormResponse:
from django.db.models.signals import pre_save
from django.dispatch import receiver
@receiver(pre_save, sender=FormResponse)
def create_slug(sender, instance, *args, **kwargs):
print(args)
print(kwargs)
Sorry for the late reply. just put this on the README (a bit too late, tbh), but I'm not using Django in any projects, and am open to someone else taking over maintenance of this package. I don't really have the time or need to push new features at the moment.