Skip to content

ombu/django-gm2m

 
 

Repository files navigation

django-gm2m

© 2014-2020 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 has been tested with Django 3.2.*, 4.1.*, 4.2.* and their matching Python versions (3.8, 3.9, 3.10, 3.11).

If you like django-gm2m and find it useful, you may want to thank me and encourage future development by sending a few mBTC / mBCH / mBSV at this 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.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages

  • Python 100.0%