-
修改 urls.py 檔案內容:
#vim urls.py : from views import here #加入此行 : : urlpatterns = [ url(r'^admin/', admin.site.urls), url(r'^here/$', here), #加入這一行 ]
-
新增 views.py 檔案:
#vim views.py # -*- coding: utf-8 -*- from django.http import HttpResponse def here(request): return HttpResponse("Hello World!")
-
啟動 django 站台:
#../manage.py runserver 192.168.5.104:8080
-
使用 firefox 開啟網頁:
#firefox http://192.168.5.104:8080/here/