Skip to main content

© 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 2.2.*, 3.0.*, 3.1.*, 3.2.*, 4.0.*, 4.1.*, 4.2.*, 5.0.*, 5.1.*, 5.2.* and their compatible Python versions (3.8 to 3.13).

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.

Release files for django-gm2m 1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for django-gm2m 1.3
File Interpreter ABI Platform
django_gm2m-1.3-py3-none-any.whl Python 3 none any Details

Release files / django_gm2m-1.3-py3-none-any.whl

Download URL django_gm2m-1.3-py3-none-any.whl
Size 29.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b68c1b1c0bd5152b05b70ec088dece1f301a738f002ad05fe8ba09df0d19432d
BLAKE2b-256 checksum
How to use checksums
f13cc61e9a1fa512f8fc86843c5bd4830cb64d43e44b464c23e7642f4d6d2221
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.11

Release history Release notifications | RSS feed

This release

1.3 This release

1 release file

1.2

1 release file

1.1.1

1 release file

1.1

1 release file

1.0

1 release file

0.6.1

1 release file

0.6

1 release file

0.5

1 release file

0.4.10

1 release file

0.4.9

1 release file

0.4.8

1 release file

0.4.7

1 release file

0.4.6

1 release file

0.4.5

1 release file

0.4.4

1 release file

0.4.3

1 release file

0.4.2

1 release file

0.4.1

1 release file

0.4

1 release file

0.3

1 release file

0.2.8

1 release file

0.2.7

1 release file

0.2.6

1 release file

0.2.5

1 release file

0.2.4

1 release file

0.2.3

1 release file

0.2.2

1 release file

0.2.1

1 release file

0.2

1 release file

0.1.1

1 release file

0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page