Yep,

I'm a bginner with Django, but translating it into CakePHP (based on
Rails) I would like to define a kind of relation where, given the:

- Foreign key of let's say the News.id
- the Foreign_model_name (i.e News)

I get the News.category of a specific item

While just retriving the News Categories is like to retrieve all
GenericCategory with Foreign_model_name = 'News'

basically

News belongsTo GenericCategory (with condition Foreign_model_name =
'News')

While GenericCategory hasMany News, Products etc


Dan


--~--~---------~--~----~------------~-------~--~----~
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 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to