Re: How to insert into multiple tables cascading

2021-06-23 Thread DJANGO DEVELOPER
https://docs.djangoproject.com/en/3.2/topics/forms/modelforms/ read this official doc of django. all is written about modelformset and inlineformset_factory. On Thu, Jun 24, 2021 at 6:35 AM DJANGO DEVELOPER wrote: > have you tried to implement the inlineformset_factory function within your >

Re: How to insert into multiple tables cascading

2021-06-23 Thread David Crandell
Thank you my friend. I will give this a try. David L. Crandell 469-585-5009 g uitard...@outlook.com guitardave8...@gmail.com da...@onholdwizard.com On Wed, Jun 23, 2021 at 8:36 PM DJANGO DEVELOPER wrote: > have you tried to implement the inlineformset_factory function within your > views? if

Re: How to insert into multiple tables cascading

2021-06-23 Thread DJANGO DEVELOPER
have you tried to implement the inlineformset_factory function within your views? if not then give a try to inlineformset_factory. because through inlineformset_factory you can populate data of different models through a single form. for now it looks a solution to me. On Wed, Jun 23, 2021 at

Re: How to insert into multiple tables cascading

2021-06-23 Thread David Crandell
Sorry customer is inherited from these types class BaseInfo(models.Model): contact1_first_name = models.CharField(help_text='Primary Contact First name', max_length=50, default=None) contact1_last_name = models.CharField(help_text='Primary Contact Last name', max_length=50, default=None)

Re: How to insert into multiple tables cascading

2021-06-23 Thread David Crandell
Thank you for your reply. here are my models. Forms below. MODELS class Customers(Prospects): cust_id = models.IntegerField(default=0) vertical_cat = models.IntegerField(default=0) custom_cat = models.IntegerField(default=0) logo = models.ImageField(default='default.png',

Re: How to insert into multiple tables cascading

2021-06-22 Thread DJANGO DEVELOPER
please share your related models and form as well. On Wed, Jun 23, 2021 at 1:22 AM David Crandell wrote: > Hello, I come from a platform where I built out forms and then manually > wrote insert statements from the form input entering all the data at once. > > What I want to do is enter a

How to insert into multiple tables cascading

2021-06-22 Thread David Crandell
Hello, I come from a platform where I built out forms and then manually wrote insert statements from the form input entering all the data at once. What I want to do is enter a customer (one table), have it populate a master region with the same name (another table), then fill out a master