List Info

Thread: Relation and view problem




Relation and view problem
user name
2006-12-28 19:21:42
Hi,

I'll try to make this as simple as possible! I have a
MasterItem
object. MasterItem has a ManyToMany relation to OpionGroup
called
available_option_groups. OptionGroup has a ManyToMany
relation to
OptionItem names option_items.

Now, I have a SubItem, which as a ForeignKey relation to
MasterItem
called master_item.

I want to be able to choose from a a list of available
options, that
were set in the MastItem, from the SubItem. Obviously, this
has
problems.

Problem 1
When you are creating a new SubItem, it doesn't know what
the
MasterItem is, so how can it get any information from a
MasterItem that
isn't there? Which means, how can I display a list of
possible/available options?

Problem 2
Lets say the SubItem now has a MasterItem set. The page
displays. I now
want to be able to select option items, from the master_item
(MasterItem) -> available_options (GroupOption) ->
items (OptionItem).
Ugh!

>From there, I don't know what to do. I've literally been
trying for 2
days to get this working! Any help or tips would be greatly
appreciated!

- matt


--~--~---------~--~----~------------~-------~--~----~
 You received this message because you are subscribed to the
Google Groups "Django users" group.
To post to this group, send email to django-usersgooglegroups.com
To unsubscribe from this group, send email to
django-users-unsubscribegooglegroups.com
For more options, visit this group at htt
p://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

[1]

about | contact  Other archives ( Real Estate discussion Medical topics )