Re: very heavy problem with edit_inline
Is it possible to add a link on my foreignkeys to edit the external reference? It's strange it's possible to add a new referenced object but not open an existing one and edit it. It should be very very useful. -- Alessandro Ronchi Skype: aronchi http://www.alessandroronchi.net SOASI Soc.Coop. - www.soasi.com Sviluppo Software e Sistemi Open Source Sede: Via Poggiali 2/bis, 47100 Forlì (FC) Tel.: +39 0543 798985 - Fax: +39 0543 579928 Rispetta l'ambiente: se non ti è necessario, non stampare questa mail --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: very heavy problem with edit_inline
2008/6/22, Karen Tracey <[EMAIL PROTECTED]>: > If all fields marked core are blanked, then the object is deleted. If you have a foreignkey with core=True, among others, it deletes also if another core field is not blank. I've tried also with my user: - - - - - user = models.ForeignKey(User, unique=True, edit_inline=models.STACKED, num_in_admin=1,min_num_in_admin=1, max_num_in_admin=1,num_extra_on_change=0) nomeditta = models.CharField("Nome Ditta", max_length=100, core=True) - - - - - and now it works. -- Alessandro Ronchi Skype: aronchi http://www.alessandroronchi.net SOASI Soc.Coop. - www.soasi.com Sviluppo Software e Sistemi Open Source Sede: Via Poggiali 2/bis, 47100 Forlì (FC) Tel.: +39 0543 798985 - Fax: +39 0543 579928 Rispetta l'ambiente: se non ti è necessario, non stampare questa mail --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: very heavy problem with edit_inline
2008/6/22, Alessandro Ronchi <[EMAIL PROTECTED]>: > 2008/6/21, Scott Moonen <[EMAIL PROTECTED]>: > > > Yes, I think it is incorrect. It should be set on some field that the user > > can type in and which must not be blank. Then, when that field is left > > blank, the admin will actually delete the address. I recommend setting > > core=True on the indirizzo field. If there's more than one core=True field it doesn't work: if one of them is deleted, the object is deleted. expecially there's problems if the core=True is set on the ForeignKey. Maybe it's the same problem with extending the users in another threads. -- Alessandro Ronchi Skype: aronchi http://www.alessandroronchi.net SOASI Soc.Coop. - www.soasi.com Sviluppo Software e Sistemi Open Source Sede: Via Poggiali 2/bis, 47100 Forlì (FC) Tel.: +39 0543 798985 - Fax: +39 0543 579928 Rispetta l'ambiente: se non ti è necessario, non stampare questa mail --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: very heavy problem with edit_inline
On Sun, Jun 22, 2008 at 3:32 AM, Alessandro Ronchi < [EMAIL PROTECTED]> wrote: > 2008/6/21, Scott Moonen <[EMAIL PROTECTED]>: > > Yes, I think it is incorrect. It should be set on some field that the > user > > can type in and which must not be blank. Then, when that field is left > > blank, the admin will actually delete the address. I recommend setting > > core=True on the indirizzo field. > > If I put core=True on more than one field, and if 1/3 of those fields > is blank, the object is deleted, or it needs 3/3 fields blank to > delete? > If all fields marked core are blanked, then the object is deleted. BTW this core thing is gone in newforms-admin. There's a 'delete' checkbox next to edited-inline objects that lets you delete them in a more straightforward manner. Karen --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: very heavy problem with edit_inline
2008/6/21, Scott Moonen <[EMAIL PROTECTED]>: > Yes, I think it is incorrect. It should be set on some field that the user > can type in and which must not be blank. Then, when that field is left > blank, the admin will actually delete the address. I recommend setting > core=True on the indirizzo field. If I put core=True on more than one field, and if 1/3 of those fields is blank, the object is deleted, or it needs 3/3 fields blank to delete? -- Alessandro Ronchi Skype: aronchi http://www.alessandroronchi.net SOASI Soc.Coop. - www.soasi.com Sviluppo Software e Sistemi Open Source Sede: Via Poggiali 2/bis, 47100 Forlì (FC) Tel.: +39 0543 798985 - Fax: +39 0543 579928 Rispetta l'ambiente: se non ti è necessario, non stampare questa mail --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: very heavy problem with edit_inline
Yes, I think it is incorrect. It should be set on some field that the user can type in and which must not be blank. Then, when that field is left blank, the admin will actually delete the address. I recommend setting core=True on the indirizzo field. -- Scott On Sat, Jun 21, 2008 at 2:39 PM, Alessandro Ronchi < [EMAIL PROTECTED]> wrote: > 2008/6/21, Scott Moonen <[EMAIL PROTECTED]>: > > Alessandro, see the documentation for the "core" model field option: > > http://www.djangoproject.com/documentation/model-api/#core > > > > You should set core=True on some field that must otherwise be present in > an > > address. Looks like "indirizzo" is such a field. > > I've set core=True on my impresa field (the one with edit_inline= > True). Is it wrong? > > -- > Alessandro Ronchi > Skype: aronchi > http://www.alessandroronchi.net > > SOASI Soc.Coop. - www.soasi.com > Sviluppo Software e Sistemi Open Source > Sede: Via Poggiali 2/bis, 47100 Forlì (FC) > Tel.: +39 0543 798985 - Fax: +39 0543 579928 > > Rispetta l'ambiente: se non ti è necessario, non stampare questa mail > > > > -- http://scott.andstuff.org/ | http://truthadorned.org/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: very heavy problem with edit_inline
2008/6/21, Scott Moonen <[EMAIL PROTECTED]>: > Alessandro, see the documentation for the "core" model field option: > http://www.djangoproject.com/documentation/model-api/#core > > You should set core=True on some field that must otherwise be present in an > address. Looks like "indirizzo" is such a field. I've set core=True on my impresa field (the one with edit_inline= True). Is it wrong? -- Alessandro Ronchi Skype: aronchi http://www.alessandroronchi.net SOASI Soc.Coop. - www.soasi.com Sviluppo Software e Sistemi Open Source Sede: Via Poggiali 2/bis, 47100 Forlì (FC) Tel.: +39 0543 798985 - Fax: +39 0543 579928 Rispetta l'ambiente: se non ti è necessario, non stampare questa mail --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: very heavy problem with edit_inline
Alessandro, see the documentation for the "core" model field option: http://www.djangoproject.com/documentation/model-api/#core You should set core=True on some field that must otherwise be present in an address. Looks like "indirizzo" is such a field. -- Scott On Sat, Jun 21, 2008 at 7:37 AM, Alessandro Ronchi < [EMAIL PROTECTED]> wrote: > I am trying to let admin users edit related field in one single page. > > I have a company model that has many addresses, so I've decided to use > a Company model and an Address model with foreignkey(Company, > edit_inline=models.STACKED) > It works correcly until I've edit the company: IT DELETES ALL MY > ASSOCIATED ADDRESSES if I click on Save() of my company. > > How can I avoid this? > Is there a solution? > > Anyone uses edit_inline without problems? > > class Impresa(models.Model): >codice = models.CharField(max_length=10,blank=False, primary_key=True) >utente = models.ForeignKey(User, blank=True, null=True, unique=True) >ragione_sociale = models.CharField(max_length=100) > > class Indirizzo(models.Model): >impresa = models.ForeignKey(Impresa)#, edit_inline=models.STACKED, > core=True, related_name="indirizzi") >tipologia= models.CharField(max_length=2, blank=True, null=True, > choices=TIPO_INDIRIZZO) >indirizzo = models.CharField(max_length=100) >cap = models.CharField(max_length=10, blank=True, null=True) >citta = models.CharField(max_length=100, blank=True, null=True) >provincia = models.CharField(max_length=2, blank=True, null=True, > choices=PROVINCE, default='FC') > > > -- > Alessandro Ronchi > Skype: aronchi > http://www.alessandroronchi.net > > SOASI Soc.Coop. - www.soasi.com > Sviluppo Software e Sistemi Open Source > Sede: Via Poggiali 2/bis, 47100 Forlì (FC) > Tel.: +39 0543 798985 - Fax: +39 0543 579928 > > Rispetta l'ambiente: se non ti è necessario, non stampare questa mail > > > > -- http://scott.andstuff.org/ | http://truthadorned.org/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
very heavy problem with edit_inline
I am trying to let admin users edit related field in one single page. I have a company model that has many addresses, so I've decided to use a Company model and an Address model with foreignkey(Company, edit_inline=models.STACKED) It works correcly until I've edit the company: IT DELETES ALL MY ASSOCIATED ADDRESSES if I click on Save() of my company. How can I avoid this? Is there a solution? Anyone uses edit_inline without problems? class Impresa(models.Model): codice = models.CharField(max_length=10,blank=False, primary_key=True) utente = models.ForeignKey(User, blank=True, null=True, unique=True) ragione_sociale = models.CharField(max_length=100) class Indirizzo(models.Model): impresa = models.ForeignKey(Impresa)#, edit_inline=models.STACKED, core=True, related_name="indirizzi") tipologia= models.CharField(max_length=2, blank=True, null=True, choices=TIPO_INDIRIZZO) indirizzo = models.CharField(max_length=100) cap = models.CharField(max_length=10, blank=True, null=True) citta = models.CharField(max_length=100, blank=True, null=True) provincia = models.CharField(max_length=2, blank=True, null=True, choices=PROVINCE, default='FC') -- Alessandro Ronchi Skype: aronchi http://www.alessandroronchi.net SOASI Soc.Coop. - www.soasi.com Sviluppo Software e Sistemi Open Source Sede: Via Poggiali 2/bis, 47100 Forlì (FC) Tel.: +39 0543 798985 - Fax: +39 0543 579928 Rispetta l'ambiente: se non ti è necessario, non stampare questa mail --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---