Skip to main content

Django generic many-to-many field

Project description

© 2014-2016 Thomas Khyn

Django generic many-to-many field implementation.

This django application exposes a GM2MField that combines the features of the standard Django ManyToManyField and GenericForeighKey and that can be used exactly the same way.

It works with Django 1.8+ and has been tested with the latest minor versions of Python (2.7 and 3.5).

If you like django-gm2m and are looking for a way to thank me and/or encourage future development, you can send a few mBTC at this Bitcoin address: 1EwENyR8RV6tMc1hsLTkPURtn5wJgaBfG9.

Features

  • Works like the built-in Django related fields

  • Creates one table per relation, like ManyToManyField, and not one big table linking anything to anything (django-generic-m2m’s default approach)

  • No need to modify nor monkey-patch the existing model classes that need to be linked

  • Automatic reverse relations when an instance is added

  • Related objects prefetching

  • Through models support

  • Deletion behaviour customization using signals

  • Migrations support

Documentation

The documentation is hosted on readthedocs. You’ll find a quick start and the description of all django-gm2m’s advanced features.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django-gm2m-0.4.7.zip (34.1 kB view details)

Uploaded Source

File details

Details for the file django-gm2m-0.4.7.zip.

File metadata

  • Download URL: django-gm2m-0.4.7.zip
  • Upload date:
  • Size: 34.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for django-gm2m-0.4.7.zip
Algorithm Hash digest
SHA256 715c680aefea49173f1dde0464ef193d867bf47eff6436fd94bbb5dad6e8f523
MD5 0acb6668cd08074c0d85113bdf8541a4
BLAKE2b-256 a0db0fcc31a3c2a1d71dbd36bec53c5c2ce0aa24cf7d8f88780f0ffee68a1804

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page