python 更改模板路径

打开setting文件,加入最后一行代码

DATABASES = {

    'default': {

        'ENGINE': 'django.db.backends.sqlite3',

        'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),

    }

}


# Internationalization

# https://docs.djangoproject.com/en/1.7/topics/i18n/


LANGUAGE_CODE = 'en-us'


TIME_ZONE = 'UTC'


USE_I18N = True


USE_L10N = True


USE_TZ = True




# Static files (CSS, JavaScript, Images)

# https://docs.djangoproject.com/en/1.7/howto/static-files/


STATIC_URL = '/static/'

TEMPLATE_DIRS=(os.path.join(BASE_DIR,'templates'),)


你可能感兴趣的:(python 更改模板路径)