Gerald Klein DBA
Arch, Gentoo I3, Ranger & Vim the coding triple threat.
Linux registered user #548580
Brought to you by the Amish Mafia
HI, I have a simple contact form with an address subform in the form of "TabularInline" where you can add an arbitrary amount of addresses, after I add a contact and an address and save, when I go to add a brand new contact and address, the address that I just added will be there and if I add the new contact it will over write not only the address but contact I added previously, so it is keeping the entire record and updating it. It won't fix itself until I stop the django server and start it again. Then I can do the whole thing again with a new record.I appreciate any that someone can give, thanks--Gerald Klein DBA
--
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...@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/bdaf77eb-7862-428b-923f-bb4c44c5dad0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Daniel,I didn't include any code as I didn't do anything unusual but if you think that would help here it is.I was hoping that there was some ordinary theoretical basis for this as I didn't do anything custom really, aside from the id generation for the "Entity" class, which I generate the id manually much like an Oracle sequence object, I do this in order to facilitate the creation of relationships between arbitrary objects.
class Entity(models.Model):""" the fName field is also the company name field """id = models.BigIntegerField(primary_key=True, unique=True, default=get_entity_id())
--
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...@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/312afeac-a3cf-479b-a544-7f6690732257%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
def save(self, **kwargs):
if not self.id:
self.id = get_entity_id()
super(Entity, self).save(**kwargs)