Preparation [plain] django-admin.py startproject web05 django-admin.py startapp blog registration to settings. python manage in py. create a templates file under the py runserver blog and configure the url [python] from django. conf. urls. defaults import patterns, include, url urlpatterns = patterns ('', url (R' ^ show/shouye/$ ', 'blog. views. index', {'template _ name': 'index.html '}), url (R' ^ show/zhengzhi/$', 'blog. views. index', {'template _ name': 'zhengzhi.html '} ), Url (R' ^ show/jingji/$ ', 'blog. views. index', {'template _ name': 'jingji.html '}),) Configure views [python] # coding: utf8 from django. shortcuts import render_to_response def index (req, template_name): return render_to_response (template_name, {}) configure the base file in the template [html] <? Xml version = "1.0" encoding = "UTF-8"?> <! DOCTYPE html PUBLIC "-// W3C // dtd xhtml 1.0 Strict // EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">