I created a list/detail generic view for Toy, and passed ToyPicture
objects, as an extra_context. That seems to work, not sure, how to
filter the objects at a URLconf level though, if that's possible, or
if I'll have to filter it at a template level.

Still not sure if this is the *best* way to do it.

On Sep 28, 12:18 pm, Panos Laganakos <[EMAIL PROTECTED]>
wrote:
> Having two different models, ie: Toy, ToyPicture.
>
> ToyPicture, has a ForeignKey to Toy, so you can define many pictures,
> that relate to a specific toy.
>
> The question is this: in which way should I make the data available
> for viewing?
>
> 1. Create list/detail generic views for Toy? That would mean I would
> have to create a custom template tag, in order to make the ToyPicture,
> available at the template level of Toy.
>
> 2. Create my own custom views of Toy/ToyPicture.
>
> What we should consider best practice, or is there's a completely
> different way to do it?


--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to