[#1] Fix json import in sites.py

Do the json import in a similar way as the previous commit, checking
for the version of Django.