课程
/后端开发
/Python
/django入门与实践
输入地址直接出现这个错误,找半天也看不懂什么错误
2018-07-05
源自:django入门与实践 6-1
正在回答
http://127.0.0.1:8000/
from django.shortcuts import render # from django.http import HttpResponse def index(request): return render(request, 'index.html', {'hello': 'Hello World', 'Tom': '你好!Tom'}) # return HttpResponse('hello world')
from django.contrib import admin from django.urls import path from . import views urlpatterns = [ path('', views.index) ]
from django.contrib import admin from django.urls import path, include urlpatterns = [ path('admin/', admin.site.urls), path('', include('blog.urls')), ]
举报
手把手带你进入Django开发的大门,充分领略Django的魅力