hi dan - a little further down on the contenttypes doc page you link to there is documentation on the generic foreign key mechanism bundled with the contenttypes app: http://docs.djangoproject.com/en/dev/ref/contrib/contenttypes/#id1
pretty similar to what you describe ;) On Wed, Feb 11, 2009 at 11:05 AM, danfreak <freakclimb...@gmail.com> wrote: > > Hey guys, > > I was wondering how to create a let's call it "GenericCategory" model. > > Given that News, Products, etc, often belongs to a Category, why have > tons of tables (news_categories, products_categories) etc > > The "GenericCategory" model table structure should be like: > > - id > - foreign_model_name > - foreign_key > - field_1 (category_name for example) > - field_2 (category_description for example) > > Ho can I make this working with the The contenttypes framework (http:// > docs.djangoproject.com/en/dev/ref/contrib/contenttypes/)? > > Or is there a better way to achieve this result in Django? > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---