pre-populate new record foreing key in admin django-suit

2017-02-03 Thread Roberto Russi
I need to pre-populate some fields in the form opened when you press the plus button to add a new record for a foreingkey field in the admin interface. I'm using Django-Suit. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe

In the admin area Pre-select foreingkey fields for filtered list

2017-02-08 Thread Roberto Russi
In the admin I have a list with a filter on a foreing-key field of model. In the new record form, when the filter is applied, I wont that foreing-key field is pre-compiled with the same value of the filter. Is there a way? -- You received this message because you are subscribed to the Google

validation of admin form with inlines

2017-02-04 Thread Roberto Russi
I need to validate a form in the admin area checking if the SUM of 'price' field in inlines match whit 'amount' field in the main form. What is best way? -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and

Re: form_invalid

2017-01-30 Thread Roberto Russi
Is just what i pictured. But when form_invalid is called? Il giorno lunedì 30 gennaio 2017 02:35:54 UTC+1, Melvyn Sopacua ha scritto: > > On Sunday 29 January 2017 04:10:20 Roberto Russi wrote: > > > I need get data from a form when submit is clicked even if data are > >

Re: form_invalid

2017-01-29 Thread Roberto Russi
elf, request, *args, **kwargs), in request.POST, you'll > have your form's data (before it's validated). > > HTH, > Norberto > > 2017-01-29 9:10 GMT-03:00 Roberto Russi <robrus...@gmail.com > >: > >> I need get data from a form when submit is clicked even if dat

Re: form_invalid

2017-01-29 Thread Roberto Russi
X1CEazC1dAK3aD1n8zl1aUU'], > 'demo_desc > r': [''], 'demo_code': ['']}> > > ... > > BTW, I had to add "blank=True, null=True" to your models, otherwise > the fields are marked as required and the browser does validate that. > > HTH, > Norberto > > > 2017-

form_invalid

2017-01-29 Thread Roberto Russi
I need get data from a form when submit is clicked even if data are invalid, inconplete or empty. I try to override form_invalid in CreateView but it is never called and form_valid, obviously, only if data are valid. Why form_invalid is never called? I have this test project with django 1.10.5

Add new record in filtered list in the admin interface

2017-02-26 Thread Roberto Russi
In the Admin interface when I add a new record to a filtered list and submits it, I come back in a no longer filtered list unlike when I edit a record. How can I fix this problem? -- You received this message because you are subscribed to the Google Groups "Django users" group. To

inline parent value

2016-12-01 Thread Roberto Russi
hi, I have 3 models: class Orders(models.Model): brand = models.ForeignKey( Brands, verbose_name = "Brand", null=True, blank=True, related_name="ord_brand" ) dateord = models.DateField("Date") numbord =

Inline master

2016-12-01 Thread Roberto Russi
I have 3 models: class Products(models.Model): brand = models.ForeignKey( Brands, verbose_name = "Brand", ) code = models.CharField("Code", max_length=25, ) descr = models.CharField("Description",