I did read the docs. The ubiquious 'TaggedItem' example I just
couldn't wrap my head around. I get it now though. For those who find
this looking for a solution:
Just add three fields to your model:
content_type = models.ForeignKey(ContentType)
object_id = models.PositiveIntegerField()
item = gen
On 5 déc, 20:30, mack the finger wrote:
> I can't quite wrap my brain around how to do generic relations. I have
> a `Receipt` model which is a receipt of a purchase. One of the fields
> is `item` which is a foreign key to a product model. I want to be able
> to not only have products, but other t
I can't quite wrap my brain around how to do generic relations. I have
a `Receipt` model which is a receipt of a purchase. One of the fields
is `item` which is a foreign key to a product model. I want to be able
to not only have products, but other things that the user can buy.
What do I need to d
3 matches
Mail list logo