Skip to main content

django-useful-fields

I found myself copying a few Django database field classes from project to project so I decided to bundle them together
and release them as an open source package instead. Here are the fields that are currently included:
  • TimeZoneField

    This field stores a reference to a time zone in the database and automatically instantiates the correct pytz time
    zone object on retrieval. Useful for recording a user’s default time zone.
  • MarkdownCharField

    This field is meant to be used in collaboration with a regular CharField. The regular CharField stores the Markdown-
    formatted source text and this field will store the rendered HTML version of that same text. Use the populate_from
    argument to indicated which field on the same model contains the source text. If the allow_html argument is
    False (the default), any HTML tags present in the source text will be removed using the
    bleach library. The extensions argument can be used to enable any desired
    extensions for the
    Markdown library. One extension is enabled by default:
    SmartyPants. SmartyPants is configured to use the
    correct Unicode characters (e.g. “) rather than HTML entities (e.g. “). Since CharFields don’t normally
    contain paragraphs of text, MarkdownCharField strips the <p></p> tags that Markdown always includes.
  • MarkdownTextField

    This field is meant to be used in collaboration with a regular TextField. The regular TextField stores the Markdown-
    formatted source text and this field will store the rendered HTML version of that same text. Use the populate_from
    argument to indicated which field on the same model contains the source text. If the allow_html argument is
    False (the default), any HTML tags present in the source text will be removed using the
    bleach library. The extensions argument can be used to enable any desired
    extensions for the
    Markdown library. One extension is enabled by default:
    SmartyPants. SmartyPants is configured to use the
    correct Unicode characters (e.g. “) rather than HTML entities (e.g. &ldquo;).
  • UUIDPrimaryKeyField

    UUIDs are, in many ways, better primary keys than automatically incrementing integer fields. Unfortunately, the
    default Django implementation—UUIDField—requires some boilerplate (including importing the uuid module) before
    it can be used as a primary key. UUIDPrimaryKeyField manages the boilerplate for you. Just add
    id = UUIDPrimaryKeyField()

    to your model and everything will just work.

Metadata

Release files for django-useful-fields 0.0.5

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-useful-fields 0.0.5
File Interpreter ABI Platform
django_useful_fields-0.0.5-py2.py3-none-any.whl Python 2, Python 3 none any Details

Release files / django_useful_fields-0.0.5-py2.py3-none-any.whl

Download URL django_useful_fields-0.0.5-py2.py3-none-any.whl
Size 5.0 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
e2716b03671578a679674c7a23bf0d8a84255e60c2f88dfa1cdc301d4012d89f
BLAKE2b-256 checksum
How to use checksums
83e94af98807cb2ad7292ca3b5a9824269bcb00d2713de2909b33d1200ec134a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.8.1

Security for django-useful-fields 0.0.5

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.

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