Entries tagged with many-to-many

Connecting anything to anything with Django

I'm writing this post to introduce a new project I've released, django-generic-m2m, which as its name would indicate is a generic ManyToMany implementation for django models. The goal of this project was to provide a uniform API for both creating and querying generically-related content in a flexible manner. One use-case for this project would be creating semantic "tags" between diverse objects in the database.

Read more...

Self-referencing many-to-many through

How to implement self-referencing many-to-many relationships in Django. Example use cases are modeling asymmetrical following (a-la twitter) or symmetrical friendship (a-la facebook).

Read more...

Describing Relationships: Django's ManyToMany Through

In this post I'll describe extending many-to-many relationships in Django to support additional columns on the junction table. I'll be using the following table structure as the starting place. Imagine an RSS aggregator consisting of feeds, articles and categories. Articles come from a feed and may belong to any number of categories.

ManyToMany

Read more...