Django's CommaSeparatedIntegerField

It doesn't do what you think it does, but it can still be useful.

June 04, 2014

I've you ever need to store lists of IDs in a field in Django, you've probably
come across the CommaSeparatedIntegerField. It sounds ideal - you can save
lists to and from the database. Brilliant.

Except that that's not how it works. The CommaSeparatedIntegerField is in
fact nothing more than a CharField with . . .

Read More

Mocking dates with Django

It's not as simple as it at first appears - some tips from the frontline.

December 01, 2013

A lot of what we do at YJ is date-dependent, and amongst our unit tests we have (as I now know) 500+ tests that rely in some sense on the value of python's function.

Since launching YJ we have been running on Django 1.4, and mocking out using the technique outlined in this article:

from  . . .

Read More

Django middleware, sessions and users

September 06, 2013

A brief walkthrough of the Django session and authentication middleware.

tl;dr If you already know how Django sessions and auth work, read no further - you won't learn anything new.

Coming from a .NET 'enterprise' background, one of the things that confused me at first about Django was the phrase . . .

Read More

Custom filters for Django objects

July 16, 2013

Using mixins to add fluid filters to Django model managers.

There are plenty of samples on the web showing how to create custom Django
QuerySet and Manager classes to create fluid manager interfaces; here's
another one.

We have a lot of shared fields across models, that we filter on in similar
ways, . . .

Read More

Deploying Django apps to Heroku (#3)

July 11, 2013

In the third (probably not final) post on our deployment process, our Fabric
script has become intelligent enough to manage deployment options on our

First a quick recap. As I've posted previously, YunoJuno is a Django app,
hosted on Heroku. We use Fabric to manage deployments, which, as is the
Heroku way, . . .

Read More

Packaging Django apps

Packaging Django-aware libraries for distribution

March 07, 2013

Packaging apps so that they can be tested within a django context, but without having to add them to an existing django project is pretty easy to to, but takes a bit more work than a standalone application.

We recently pushed our django-errordite and python-errordite apps to PyPI, and as part of that process I was keen to ensure that . . .

Read More

   Subscribe by email and never miss a post.

This update link alerts you to new Silvrback admin blog posts. A green bubble beside the link indicates a new post. Click the link to the admin blog and the bubble disappears.

Got It!