Указывая на index.html в Джанго - PullRequest
       4

Указывая на index.html в Джанго

0 голосов
/ 01 декабря 2019

Я только что обновился до новой версии django и теперь испытываю трудности с указанием на мой файл index.html

Это структура моего проекта

gradMVPV1
--> .idea
--> catalog
    views
    models
    apps
    ....
--> gradMVPV1
    settings
    urls
    wsgi
    ....
--> templates
---->index.html
db.sqlite3
manage.py

Это мои настройки. py файл

BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
TEMPLATE_DIR = os.path.join(BASE_DIR, '/templates')

urls.py

urlpatterns = [
    path('admin/', admin.site.urls),
    path('', views.index, "index"),
]

и просмотры

def index(request):
    return render(request, "index.html")

это мое сообщение об ошибке

 ValueError at /
dictionary update sequence element #0 has length 1; 2 is required
Request Method:
GET
Request URL:
http://127.0.0.1:8000/
Django Version:
2.2.7
Exception Type:
ValueError
Exception Value:
dictionary update sequence element #0 has length 1; 2 is required
Exception Location:
C:\Users\User\Anaconda3\lib\site-packages\django\urls\resolvers.py in resolve, line 348
Python Executable:
C:\Users\User\Anaconda3\python.exe
Python Version:
3.7.4
Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...