try this...
https://www.caktusgroup.com/blog/2018/05/07/creating-dynamic-forms-django/


On Wed, Nov 6, 2019 at 10:11 AM Jordan Micle <[email protected]>
wrote:

> in general when we define django form we set the model of django in class
> Meta, like below
>
> class Form(forms.ModelForm):
>
>     class Meta:
>         model = ModelName
>         fields = '__all__'
>
>
>
> But I am going to set this ModelName dynamically
> like this.
> class Form(forms.ModelForm, modelparameter Model):
>
>     class Meta:
>         model = Model
>         fields = '__all__'
>
> Is that possible?
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/7c466d3c-d9da-4f42-8c7b-e2a6428aa235%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/7c466d3c-d9da-4f42-8c7b-e2a6428aa235%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAHGmjWVVcd2hYh3TMxArRUU5L18eSM8Tfdi1cuhrtqDN3qdCtg%40mail.gmail.com.

Reply via email to