Modern django

Here are a couple of modernizations for more recent versions of Django.

What do you think?