Finished up to 3.6, First unit test and url mapping, dummy view

chap3
Jason Zhu 2020-11-07 14:42:22 +11:00
parent ff9370e0ca
commit 1827d492d6
2 changed files with 5 additions and 3 deletions

View File

@ -1,3 +1,5 @@
from django.shortcuts import render from django.shortcuts import render
home_page = None # Create your views here
def home_page():
pass

View File

@ -14,8 +14,8 @@ Including another URLconf
2. Add a URL to urlpatterns: url(r'^blog/', include('blog.urls')) 2. Add a URL to urlpatterns: url(r'^blog/', include('blog.urls'))
""" """
from django.conf.urls import url from django.conf.urls import url
from django.contrib import admin from lists import views
urlpatterns = [ urlpatterns = [
url(r'^admin/', admin.site.urls), url(r'^$', views.home_page, name='home'),
] ]