Skip to content

Baltrunas/django-helpful

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A handful of utilities for Django!

Latest PyPI version

Number of PyPI downloads

image

Install

  • Copy to helpful or include as git submodule
  • Add `'helpful', to INSTALLED_APPS`
HELPFUL_EMAIL_MODE = 'PROD' | 'DEBUG' | 'BLANK'
HELPFUL_EMAIL_DEBUG_INFO = True | False
HELPFUL_EMAIL_DEBUG_TO_EMAIL = ['debug@email.com']

Template Tags

image2base64

convert image to base64

{% image2base64 "image.png" %}

object_dict

{% load object_dict %}
{% for field in message|object_dict %}
    {{ field.verbose_name }}
    {{ field.display }}
{% endfor %}

abs_puth

{% load abs_puth %}
{% abs_puth "static" "django/img/logo.png" %}
{% abs_puth "media" "uploads/photos/joue.jpg" %}
{% abs_puth "base" "templates/e-mail/css/style.css" %}
{% abs_puth "parent" "extra/logo.png" %}

easy_email

template must be 'email/contacts' files 'email/contacts.html' and 'email/contacts.txt' must will exist

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)

About

Useful things for django!

Resources

Stars

Watchers

Forks

Packages

No packages published