Index ¦ Archives ¦ Atom > Tag: django

Speed up Django static files

For a fairly easy performance win, and for something which makes dealing with old cached CSS something a thing of the past - enable ManifestStaticFilesStorage.

First of all you'll need to edit settings.py:

# Use manifest static storage
STATICFILES_STORAGE = 'django.contrib.staticfiles.storage.ManifestStaticFilesStorage'

Then you'll need to edit any templates …


Be careful with Django's .create_or_update()!

Although using Model.objects.create_or_update() with a Django model is extremely convenient, sometimes you might want to consider using it carefully with certain usage patterns.

Excessive Postgres WAL files

To allow point-in-time recovery (PITR), I usually setup Barman. Set it up on a remote server, get your Postgres instance to …

© Alex Tomkins.