Update models.py

made site and root_url defined if Site.meta._installed is not true or throws an exception