Fix most problems with usage from pypi
The code was used by copy-pasting the repository in another Django project, so there was a lot of problem with using from a PyPI package, especially for pdf export with a setting file generated by a new version of Django.