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).
Metadata
Release files for django-proxy-overrides 0.2.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| django_proxy_overrides-0.2.3-py3-none-any.whl | Python 3 | none | any | Details |
Release files / django_proxy_overrides-0.2.3-py3-none-any.whl
| Download URL | django_proxy_overrides-0.2.3-py3-none-any.whl |
|---|---|
| Size | 4.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
405f8ce31ad3270298f2d1735b526c2b06072791d3bbcdca526738ec3477e3b9
|
|
BLAKE2b-256 checksum How to use checksums |
eef211811f034d69009052b82431c73fd1c1e16040e51ff0e0cba0b7ed6b71b8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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
|