Fix django logging handler circular import bug

c5d2d16d907b91695608766993eb3ae277edc9bb introduces a circular import bug when adding the sentry handler to django logging in settings.py, as per the sentry docs. Django tries to configure logging, which imports the sentry handler, which imports the django client, which imports models from the django sites framework -  the circular import.

The bug causes this error:

    Unable to configure handler 'sentry': 'module' object has no attribute 'django'

This patch simply defers the `django.contrib.sites` import until it is actually needed.