Django “TemplateDoesNotExist ” Error but “Using loader django.template.loaders.app_directories.Loader” File Exists

前端 未结 7 1963
我在风中等你
我在风中等你 2021-01-05 19:05

Template Loader finds the template but template is not loaded

TemplateDoesNotExist at /cardpayment/

cardpayment.html

Request Method:     G         


        
7条回答
  •  旧巷少年郎
    2021-01-05 19:44

    I had the same problem and it was solved after changing the order of the apps in INSTALLED_APPS in the settings.py file.
    Put your app's name first on the list:

    INSTALLED_APPS = [
        'module_name',
        'django.contrib.admin',
        'django.contrib.auth',
        'django.contrib.contenttypes',
        'django.contrib.sessions',
        'django.contrib.messages',
        'django.contrib.staticfiles',
    ]
    

提交回复
热议问题