fix __file__ undefined issue in settings.py