Re: Multiple ForeignKey Relationship

2008-02-21 Thread paul

Hi Michael,

Thanks a lot. That query made me realize I've got to re-think this.

http://groups.google.com/group/django-users/browse_thread/thread/477915b60c5d160e/ff677bbbf87ea9b3?lnk=gst&q=django+edit+inline#ff677bbbf87ea9b3


On Feb 21, 8:21 am, Michael Newman <[EMAIL PROTECTED]> wrote:
> http://www.djangoproject.com/documentation/model-api/#many-to-one-rel...
>
> look at the edit inline option. The blogosphere is also nice enough to
> have posted hundreds of examples and test cases that might meet your
> purposes. Google django edit inline for these examples.
>
> On Feb 21, 9:56 am, [EMAIL PROTECTED] wrote:
>
> > I'm trying to work out how I'm going to setup a model structure a
> > video section of my website. Say I have this scenario.
>
> > - Each video belongs to a set of 4-5 videos.
> > - Depending on the set the video belongs too, certain information will
> > need to be attached to that video (ie> recipe/chef information, wines
> > to drink with this recipe. Etc.)
> > - Videos need to be able to be independent as well, in case the set is
> > removed but the video is still wanted on the site. Same goes for
> > Recipes as they will exist independently on the site.
> > - In the future Videos will reside within different sets and require
> > different information then these.
>
> > So, my situation is this:
>
> > I have a Video model setup as a ForeignKey to my VideoSet model. I
> > then have Recipe and Chef information each setup as a ForeignKey to
> > Video. This is great for adding Recipe and Chef info to a video
> > directly through the admin, however the Recipe and Chef information do
> > not get attached to the Video within the VideoSet admin interface.
>
> > Is there a way to nest ForeignKey relationships?
--~--~-~--~~~---~--~~
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: Multiple ForeignKey Relationship

2008-02-21 Thread Michael Newman

http://www.djangoproject.com/documentation/model-api/#many-to-one-relationships

look at the edit inline option. The blogosphere is also nice enough to
have posted hundreds of examples and test cases that might meet your
purposes. Google django edit inline for these examples.

On Feb 21, 9:56 am, [EMAIL PROTECTED] wrote:
> I'm trying to work out how I'm going to setup a model structure a
> video section of my website. Say I have this scenario.
>
> - Each video belongs to a set of 4-5 videos.
> - Depending on the set the video belongs too, certain information will
> need to be attached to that video (ie> recipe/chef information, wines
> to drink with this recipe. Etc.)
> - Videos need to be able to be independent as well, in case the set is
> removed but the video is still wanted on the site. Same goes for
> Recipes as they will exist independently on the site.
> - In the future Videos will reside within different sets and require
> different information then these.
>
> So, my situation is this:
>
> I have a Video model setup as a ForeignKey to my VideoSet model. I
> then have Recipe and Chef information each setup as a ForeignKey to
> Video. This is great for adding Recipe and Chef info to a video
> directly through the admin, however the Recipe and Chef information do
> not get attached to the Video within the VideoSet admin interface.
>
> Is there a way to nest ForeignKey relationships?
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Multiple ForeignKey Relationship

2008-02-21 Thread paul

I'm trying to work out how I'm going to setup a model structure a
video section of my website. Say I have this scenario.

- Each video belongs to a set of 4-5 videos.
- Depending on the set the video belongs too, certain information will
need to be attached to that video (ie> recipe/chef information, wines
to drink with this recipe. Etc.)
- Videos need to be able to be independent as well, in case the set is
removed but the video is still wanted on the site. Same goes for
Recipes as they will exist independently on the site.
- In the future Videos will reside within different sets and require
different information then these.

So, my situation is this:

I have a Video model setup as a ForeignKey to my VideoSet model. I
then have Recipe and Chef information each setup as a ForeignKey to
Video. This is great for adding Recipe and Chef info to a video
directly through the admin, however the Recipe and Chef information do
not get attached to the Video within the VideoSet admin interface.

Is there a way to nest ForeignKey relationships?
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---