Compatibility with recent Django