Django 1.6 compat

Signed-off-by: Michal Čihař <michal@cihar.com>