On Wed, Nov 6, 2019 at 10:11 AM Jordan Micle <jordanmicle2019@gmail.com> 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 = ModelNamefields = '__all__'But I am going to set this ModelName dynamicallylike this.class Form(forms.ModelForm, modelparameter Model):class Meta:model = Modelfields = '__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 django-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/7c466d3c-d9da-4f42-8c7b-e2a6428aa235%40googlegroups.com.
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 django-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAHGmjWVVcd2hYh3TMxArRUU5L18eSM8Tfdi1cuhrtqDN3qdCtg%40mail.gmail.com.
No comments:
Post a Comment