Django helpful things
Project description
================================== A handful of utilities for Django!
.. image:: https://img.shields.io/pypi/v/django-helpful.svg :target: https://pypi.python.org/pypi/django-helpful :alt: Latest PyPI version .. image:: https://img.shields.io/pypi/dm/django-helpful.svg :target: https://pypi.python.org/pypi/django-helpful :alt: Number of PyPI downloads .. image:: https://img.shields.io/pypi/l/django-helpful.svg :target: https://pypi.python.org/pypi/django-helpful
Install
- Copy to helpful or include as git submodule
- Add
'helpful',
toINSTALLED_APPS
- Add
EMAIL_DEBUG
tosettings.py
for use debug email mode.
Template Tags
image2base64 ^^^^^^^^^^^^ convert image to base64
.. code-block:: html
{% image2base64 "image.png" %}
object_dict ^^^^^^^^^^^ .. code-block:: html
{% load object_dict %}
{% for field in message|object_dict %}
{{ field.verbose_name }}
{{ field.display }}
{% endfor %}
abs_puth ^^^^^^^^ .. code-block:: html
{% load abs_puth %}
{% abs_puth "static" "templates/e-mail/css/style.css" %}
{% abs_puth "media" "templates/e-mail/css/style.css" %}
{% abs_puth "base" "templates/e-mail/css/style.css" %}
{% abs_puth "parent" "templates/e-mail/css/style.css" %}
easy_email
template must be 'email/contacts' files 'email/contacts.html' and 'email/contacts.txt' must will exist
.. code-block:: hpython
from helpful.easy_email import mail
mail(subject, context, template, from_email, to_email, connection=None, reply_to=None, attach_files=[], cc=None, bcc=None)
Project details
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
Hashes for django_helpful-1.5.4-py2-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9d243a0b4d5444dcf2aa921b6acde5f7f93ec1ae22e572f8348efaf4d5db7094 |
|
MD5 | 689f0086cd444ebb9fd42c197ea71c16 |
|
BLAKE2b-256 | 4485daced6cffbd32e34b39adae8fc89560c74929dd56f39946866f6267a11d2 |