django-etc 1.4.0
pip install django-etc
Released:
Tiny stuff for Django that won't fit into separate apps.
Navigation
Unverified details
These details have not been verified by PyPIProject links
Meta
- License: BSD License (BSD 3-Clause License)
- Author: Igor `idle sign` Starikov
Classifiers
- Development Status
- Environment
- Framework
- Intended Audience
- License
- Operating System
- Programming Language
Project description
https://github.com/idlesign/django-etc
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.
Documentation
Project details
Unverified details
These details have not been verified by PyPIProject links
Meta
- License: BSD License (BSD 3-Clause License)
- Author: Igor `idle sign` Starikov
Classifiers
- Development Status
- Environment
- Framework
- Intended Audience
- License
- Operating System
- Programming Language
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file django-etc-1.4.0.tar.gz
.
File metadata
- Download URL: django-etc-1.4.0.tar.gz
- Upload date:
- Size: 26.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: Python-urllib/3.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | fa7dbcdba5d0dd3b42eac54463fe24a9e1202a1492ecbf50ed0bc1555074af8f |
|
MD5 | 7326ecff306fd1020691f00d5f892b3a |
|
BLAKE2b-256 | 7d3bc164f4edd0aa3f5026e15aaa982771c506c2d473bbee97bbf1b7e90aefc0 |
File details
Details for the file django_etc-1.4.0-py3-none-any.whl
.
File metadata
- Download URL: django_etc-1.4.0-py3-none-any.whl
- Upload date:
- Size: 21.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: Python-urllib/3.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 61aee75a97ef868830260de86f2a69896992776c325624c46827c831101cbd9f |
|
MD5 | 11167959b373927da0335c485016fb5d |
|
BLAKE2b-256 | 91addbfcd9aeace88a9b34b88aac5ad17418bb982343c0c72cb95491527af910 |