Relations to unknown models?

10 views
Skip to first unread message

galgal

unread,
Jan 23, 2013, 5:48:55 PM1/23/13
to django...@googlegroups.com
Hi.
I'm looking for a solution to make site-wide comments that can be connected with different models via FK.
I want to make 1 global model Comments. I want to make a relation to Articles, Relations and Solutions models. I the future I plan to add additional models. Now, Comments model should allow me to make relations to any of that models via FK. What is important, I need to have 1 and only 1 Comments model, and it won't be abstract model.
On site I want to display stats showing how many comments were added to each model.

Any suggestions?

jirka.v...@gmail.com

unread,
Jan 24, 2013, 1:02:57 AM1/24/13
to django...@googlegroups.com
Hi galgal,

You might want to take a look at django.contrib.comments (either use it or learn from it) and/or GenericForeignKey.

HTH

Jirka

From: galgal <weglare...@gmail.com>
Date: Wed, 23 Jan 2013 14:48:55 -0800 (PST)
Subject: Relations to unknown models?
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/AhXGBGXPu_oJ.
To post to this group, send email to django...@googlegroups.com.
To unsubscribe from this group, send email to django-users...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Reply all
Reply to author
Forward
0 new messages