fixed imports in sites.py and extends in templates