django-emoticons 
Django-emoticons is a django application providing utilities to add emoticons in your templates. Pretty incredible no?
Install
Once you have installed the package in your PYTHON_PATH, register the emoticons and django.contrib.staticfiles apps in your INSTALLED_APPS project’s section.
INSTALLED_APPS = ( ... 'django.contrib.staticfiles', 'emoticons', ... )
Usage
Filter Usage
For our example we will make a template who display the field content of a model, this field has this value:
Coding is fun and sexy :D
So in our templates we will load the emoticons_tags library and use the emoticons filter:
{% load emoticons_tags %}
{{ object.content|emoticons }}
Which will render:
Coding is fun and sexy
Tag Usage
The emoticons app also provides a tag named emoticons for converting raw text.
{% load emoticons_tags %}
{% emoticons %}
Documenting is boring but usefull :p
{% endemoticons %}
Which will render :
Documenting is boring but usefull
Index
If you want to retrieve a list of all availables emoticons you can use the emoticons_index tag.
{% load emoticons_tags %}
{% emoticons_index as emoticons_list %}
{% for emoticons in emoticons_list %}
<p>{{ emoticons.0|emoticons }}: {{ emoticons|join:" " }}</p>
{% endfor %}
Settings
You can use differents settings for customizing the application:
EMOTICONS_DIRECTORY
The directory where the emoticons files are located, use 'emoticons' as default.
EMOTICONS_LIST
The list of the emoticons used by the application, something like this:
(('(devil)', 'devil.gif'), ('(angel)', 'angel.gif'), ((':)', ':-)', ':=)', '(smile)'), 'smile.gif'), ((':(', ':-(', ':=(', '(sad)'), 'sadsmile.gif'), )
If the HTML code of the emoticons does not fit to your needs, you can override the 'emoticons/emoticon.html' template to adjust it.
Metadata
Release files for django-emoticons 1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| django-emoticons-1.2.tar.gz | 119.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| django_emoticons-1.2-py2.py3-none-any.whl | Python 2, Python 3 | none | any | Details |
Total release size: 261.9 kB
Release files / django-emoticons-1.2.tar.gz
| Download URL | django-emoticons-1.2.tar.gz |
|---|---|
| Size | 119.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
dc6cfbe53158bc5ec96fdc4b76d2d342145831e71efda7fa73a53d3f5deee3ab
|
|
BLAKE2b-256 checksum How to use checksums |
c307d5cfcacfee8284fba9c29e1bcc712edf4488a044ff7ef0b37720c784d144
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / django_emoticons-1.2-py2.py3-none-any.whl
| Download URL | django_emoticons-1.2-py2.py3-none-any.whl |
|---|---|
| Size | 142.7 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
6b09d9d882236960c5778710f85d3921a2cf533d82dffdeb8fef4de1fa8f3338
|
|
BLAKE2b-256 checksum How to use checksums |
f2f85f92cdfc0da7014b46dfb3b700a7fb272c9b7621a46559073686103da78e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |