Skip to main content

django-etc

https://github.com/idlesign/django-etc

release lic coverage

Description

Tiny stuff for Django that won't fit into separate apps.

Utils

  • etc.toolbox.get_site_url does its best to provide you with a site URL whether request object is available or not.
  • etc.toolbox.import_app_module imports and returns a module from a specific app by its name.
  • etc.toolbox.import_project_modules imports modules from registered apps using given module name and returns them as a list.

Models

  • etc.toolbox.InheritedModel allows to override fields attributes in inherited models.
  • etc.toolbox.get_model_class_from_string allows getting model class from its string representation.
  • etc.toolbox.get_model_class_from_settings allows getting model class from its string representation in settings module.
  • etc.toolbox.ChoicesEnumMixin helps to define choices for models using Enum from Python 3.
  • etc.toolbox.choices_list helps to define choices for models, that could be addressed later as dictionaries.
  • etc.toolbox.get_choices returns model field choices from a given choices list.

Admin

  • etc.admin.CustomModelPage allows easy construction of custom admin pages processing user input.

Forms

  • etc.toolbox.set_form_widgets_attrs allows bulk apply HTML attributes to every field widget of a given form.

Template tags

  • model_field:

    • model_field_verbose_name returns model field verbose name.
    • model_field_help_text returns model field help text.
  • model_meta:

    • model_meta_verbose_name returns model verbose name singular.
    • model_meta_verbose_name_plural returns model verbose name plural.
  • gravatar:

    • gravatar_get_url returns Gravatar image URL for a given string or UserModel.
    • gravatar_get_img returns Gravatar image HTML tag for a given string or UserModel.
  • etc_misc:

    • site_url does its best to provide you with a site URL whether request object is available or not.
    • include_ allows a template name to include template variables. Allows fallback template if the target is not found.
    • from is a filter returning a value for a given key from a given container (e.g. a dict).
    • split is a filter splitting a string into a list using the given separator.
    • staticv returns a static file URL appended with a version to invalidate client caches.

Documentation

https://django-etc.readthedocs.io/

Metadata

Release files for django-etc 1.6.0

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-etc 1.6.0
File Size Uploaded Provenance Actions
django_etc-1.6.0.tar.gz 11.9 kB Without provenance Details for django_etc-1.6.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for django-etc 1.6.0
File Interpreter ABI Platform Actions
django_etc-1.6.0-py3-none-any.whl Python 3 none any Details for django_etc-1.6.0-py3-none-any.whl

Total release size: 28.1 kB

Release files / django_etc-1.6.0.tar.gz

Download URL django_etc-1.6.0.tar.gz
Size 11.9 kB
Tags Source
SHA-256 checksum
How to use checksums
4f408977470c80705b890f7b66997b7317c01264fc3143c87c991057a7930a8e
BLAKE2b-256 checksum
How to use checksums
b24b3eb2a2b6d8d99e6ea8383058df278d2cc090cbc72ec4130c0f336f90ff1a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.7 {"installer":{"name":"uv","version":"0.13.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / django_etc-1.6.0-py3-none-any.whl

Download URL django_etc-1.6.0-py3-none-any.whl
Size 16.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5f4d540a3148fbbdbd745eed5a9551a6f99f54a475172b0f628a2d4ee9695084
BLAKE2b-256 checksum
How to use checksums
db22db43d3b8f55f511a070b0fa30fd11ceb6946416bc51c0b6eae0b2e355bd7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.7 {"installer":{"name":"uv","version":"0.13.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Security for django-etc 1.6.0

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.

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