Skip to main content

django-annotation

when model definition

import django_modelhint as d
d.get_default_mapping().add_reserved_words(doc="")

class Group(models.Model):
    name = d.CharField(max_length=255, verbose_name="Name", doc="名前")

class User(models.Model):
    group = d.ForeignKey(Group)
    name = d.CharField(max_length=255, verbose_name="Name", doc="名前")

when view

import django_modelhint as d
user = User.objects.get()
d.get_mapping(user)  # => ChainMap({}, {'name': ChainMap({}, {'doc': '名前'}), 'id': ChainMap({}, {'doc': ''}), 'group': ChainMap({}, {'doc': ''})})
d.get_mapping(user)["name"]["doc"]  # => '名前'

group = Group.objects.get()
d.get_mapping(group.user_set)  # => ChainMap({}, {'name': ChainMap({}, {'doc': '名前'}), 'id': ChainMap({}, {'doc': ''}), 'group': ChainMap({}, {'doc': ''})})

Metadata

Release files for django-modelhint 0.1.1.1

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

Source distribution (sdist)

Source distribution for django-modelhint 0.1.1.1
File Size Uploaded Provenance Actions
django-modelhint-0.1.1.1.tar.gz 3.6 kB Without provenance Details for django-modelhint-0.1.1.1.tar.gz

Release files / django-modelhint-0.1.1.1.tar.gz

Download URL django-modelhint-0.1.1.1.tar.gz
Size 3.6 kB
Tags Source
SHA-256 checksum
How to use checksums
0681b9c9e80914736e4e8f8db63d79f1c5f9224de904abe9ae6502bb6ed90dd6
BLAKE2b-256 checksum
How to use checksums
e7382e2f43180dbd45a2c34c7747ae710eba09ed2e921d86c5bbbf9e2be8799d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for django-modelhint 0.1.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.1.1 This release

1 release file No provenance

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