我正在学习django udemy课程(james carrigan),我只更新到2.0.5
tree bookstore
bookstore
âââ bookstore
â  âââ __init__.py
â  âââ __pycache__
â  â  âââ __init__.cpython-36.pyc
â  â  âââ settings.cpython-36.pyc
â  â  âââ urls.cpython-36.pyc
â  â  âââ wsgi.cpython-36.pyc
â  âââ settings.py
â  âââ urls.py
â  âââ wsgi.py
âââ db.sqlite3
âââ manage.py
âââ store
âââ admin.py
âââ apps.py
âââ __init__.py
âââ migrations
â  âââ __init__.py
â  âââ __pycache__
â  âââ __init__.cpython-36.pyc
âââ models.py
âââ __pycache__
â  âââ admin.cpython-36.pyc
â  âââ __init__.cpython-36.pyc
â  âââ models.cpython-36.pyc
â  âââ views.cpython-36.pyc
âââ templates
â  âââ store.html
â  âââ template.html
âââ tests.py
âââ views.py
这些是我的观点
def index(request):
return render(request,'template.html')
def store(request):
return render(request,'store.html')
网址
from django.contrib import admin
from django.urls import path
from django.conf.urls import url
from store import views
urlpatterns = [
url(r'^', views.index ,name='index' ),
url(r'^store', views.store ,name='store' ),
path('admin/', admin.site.urls),
]
我在HTML样板文件中更改了行
<p>Welcome to mystery books and store template is changed!</p>
我在运行服务器时遇到问题
我们看不出
http://127.0.0.1:8000/store
和
http://127.0.0.1:8000/index
为什么我的其他HTML无法识别?