Re: how can I work with multi model forms

2018-12-27 Thread Danny Blaker
https://docs.djangoproject.com/en/2.1/topics/forms/modelforms/#inline-formsets https://github.com/elo80ka/django-dynamic-formset/blob/master/docs/usage.rst https://github.com/elo80ka/django-dynamic-formset/blob/master/INSTALL.rst clone the above, then check the examples On Wednesday, 26 Decem

Re: how can I work with multi model forms

2018-12-27 Thread Ira Abbott
Hi, Model forms have one model. To have the form update fields in other models, you can overload form_valid in views so that it writes the addition form field to their respective models. Ira Sent from my iPhone > On Dec 26, 2018, at 9:45 AM, Nur Mohsin wrote: > > Hi, in views.py form.save(

Re: how can I work with multi model forms

2018-12-26 Thread Nur Mohsin
Hi, in views.py form.save() is commented. Remove comment and try again. Then, tell us what happens? On Wed, Dec 26, 2018 at 6:29 PM Tessnim Zrayga wrote: > Hello everyone, > I have this design: there's a firm, a firm can have multiple nodes. Each > node can have many scheduled actions. What I'm

how can I work with multi model forms

2018-12-26 Thread Tessnim Zrayga
Hello everyone, I have this design: there's a firm, a firm can have multiple nodes. Each node can have many scheduled actions. What I'm trying to do is to create a template containing all informations about a firm and be able to create multiple scheduled actions at a time, so this is what the te

Re: multi model forms

2011-03-01 Thread Pete
Yeah, I bet that lastname is required=True (which is default). You probably want to redefine lastname to avoid that. On Mar 1, 5:25 am, David De La Harpe Golden wrote: > On 28/02/11 23:13, django wrote: > > > hi guys > > I am new to django. > > > I have got two model User(Django built in ) and a

Re: multi model forms

2011-03-01 Thread David De La Harpe Golden
On 28/02/11 23:13, django wrote: > hi guys > I am new to django. > > I have got two model User(Django built in ) and a model customer, user > is foreign key in customer > > class Customer(models.Model): > user = models.ForeignKey(User, related_name='customers') > street = models.CharField(max

multi model forms

2011-02-28 Thread django
hi guys I am new to django. I have got two model User(Django built in ) and a model customer, user is foreign key in customer class Customer(models.Model): user = models.ForeignKey(User, related_name='customers') street = models.CharField(max_length=200) city = models.CharField(max_length=1