Hi,

The easiest way to explain this is with code I guess:
http://dpaste.com/104502/

These are the models for a contact management application. Basicly I
have a "Contact Model", which is used to hold details for both the
"Person" and "Company" Models. On the "Contact Model" I have some
generic relations, for example, Email..

I'm using generic_inlineformset_factory to handle the Forms for the
generic relations, and it works well. Any data I save on the forms is
saved linked to the corresponding Person Contenttype.

The problem:

If I do this:

entity = Person.objects.get(id=contact_id)
entity.emails.create(address="t...@mail.com2")
print entity.emails.all()

It is not saved as a Person Contenttype as one would expect, but as a
ContactContenttype, but it does save with the correct Person Id.
If I have a Company and a Person with the same Id, the object_id in
Email will be the same, and the content_type_id will also be the same,
since it currently saves as a Contact, and not as a Person or Company.

Hope I was clear..
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to django-developers@googlegroups.com
To unsubscribe from this group, send email to 
django-developers+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to