Skip to main content

Overridable foreign key fields for Proxy models

Project description

Allow overriding foreign key fields on Proxy models.

Mostly, you won’t want to do this. However, I did have a situation where it would be useful, mainly for reducing the numbers of queries I was having to run.

You can read about it at: http://schinckel.net/2015/05/13/django-proxy-model-relations/

Usage is pretty simple:

from proxy_overrides.related import ProxyForeignKey

class ProxyModel(ParentModel):
    related = ProxyForeignKey(OtherProxyModel)

You may only override fields that exist, although in the future, it may be possible to create a relation with a different name (enabling you to keep the standard relation to the non-proxy model).

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

django_proxy_overrides-0.2.2-py3-none-any.whl (4.1 kB view details)

Uploaded Python 3

File details

Details for the file django_proxy_overrides-0.2.2-py3-none-any.whl.

File metadata

  • Download URL: django_proxy_overrides-0.2.2-py3-none-any.whl
  • Upload date:
  • Size: 4.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7

File hashes

Hashes for django_proxy_overrides-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 96b4256f6f9a585b8e5e38f7153e12d0815e9e3af3c27622acfdee175a193b28
MD5 a5c23a0bb91e5fd6325a1ff117f02187
BLAKE2b-256 54153bda235b05ba55b35da4c14e042126a44d39b4dc98fcce79f7e5167090aa

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