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.

Documentation

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

Metadata

Release files for django-etc 1.5.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.5.0
File Size Uploaded Provenance Actions
django_etc-1.5.0.tar.gz 11.4 kB Without provenance Details for django_etc-1.5.0.tar.gz

Built distribution (wheel)

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

Total release size: 27.0 kB

Release files / django_etc-1.5.0.tar.gz

Download URL django_etc-1.5.0.tar.gz
Size 11.4 kB
Tags Source
SHA-256 checksum
How to use checksums
733fc603be83a184fbc2b0bd0af2d866dce44308eb4383435963ffd23f6ba3ab
BLAKE2b-256 checksum
How to use checksums
5d872c7a9c4e4f8c01f4efc3521bfaf2032411ef244839d5d81e95a377e3607f
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.5.0-py3-none-any.whl

Download URL django_etc-1.5.0-py3-none-any.whl
Size 15.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
18831a0462dc5bc9809e31fdfbee695941dc5ebfab200ac95e3eee183252f5ed
BLAKE2b-256 checksum
How to use checksums
9cba298806515aa767f9676cc188049e91c56eedb364ac3f91f238726ecbe3c1
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.5.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