django-cleanup
works seamlessly via signals.
Use django-money
, add something like CURRENCIES = ('GBP',)
to settings and use a field definition along the lines of this:
price = MoneyField(
'Price',
max_digits=20,
decimal_places=2,
default_currency='GBP'
)
In template:
{% load djmoney %}
...
{% money_localize object.price %}
Use django-constance
to supplement runtime settings with database-backed configuration. The pip installation candidate is django-constance[database]
– installing django-constance
on its own results in missing dependencies.
For a convenient DRY way to add thumbnail images to your admin list views and forms, try django-admin-thumbnails
(full disclosure: I wrote it).
E.g. priority JavaScript files, SVG Symbol files etc. Use django-simpleinliner
(full disclosure: I wrote it).
Have had previous success with django-image-cropping
though should investigate current library landscape.
For simple mailing list sign-up without CMS integration just use the mailchimp
library (pip install mailchimp
).
Use django-measurement
but beware providing multiple unit choices – it can screw up when dealing with existing values. I instead limit to one unit, but then use the field properties to output in multiple units:
from django_measurement.models import MeasurementField
from measurement.measures import Distance
...
width = MeasurementField(
'Width',
blank=True,
null=True,
measurement=Distance,
unit_choices=(('cm', 'cm'),),
)
In template:
<p>Width</p>
<p>{{ object.width.cm|floatformat }}cm</p>
<p>{{ object.width.inch|floatformat }}”</p>
django-modeltranslation
seems to be best in class.
django-widget-tweaks
provides template tags for this, e.g. {{ field|add_class:'form__input' }}
or {% render_field form.search_query type="search" %}
.
The canonical ReCAPTCHA library is django-recaptcha
.
django-colorfield
is lightweight and works well.
django-solo
provides simple mixins to help create and manage singleton models, and works perfectly as of Django 1.11 (and probably beyond).
django-admin-sortable2
provides the simplest integration and seemingly the most effective UI.
django-ckeditor
is better than TinyMCE, more easily configurable and doesn't require you to manage any static files. Here's a sensible default config:
CKEDITOR_CONFIGS = {
'default': {
'toolbar': [
['Format'],
['BulletedList', 'NumberedList'],
['Bold', 'Italic', 'Subscript', 'Superscript', '-',
'RemoveFormat'],
['Link', 'Unlink'],
['Undo', 'Redo'],
['Source']
],
'format_tags': 'p;h1;h2',
'format_h1': {'element': 'h3'},
'format_h2': {'element': 'h4'},
'removePlugins': 'elementspath,save,font',
'language': 'en-us'
},
}