在djangotest1目录下创建文件first.py
#!/usr/bin/python
from django.http import HttpResponse

def index(request):
'''this is test first python'''
return HttpResponse(“this is the first python.”)
修改urls.py文件
在末尾添加:
urlpatterns += patterns( #此处使用+=的方式,在原有基础上添加urlpatterns,这种方法便于分开自定义的url块
#在多个不同类型中,可以更快的定位到自定义的url,个人较中意这种方式
url(r'^$','djangotest1.first.index'), # r'^$' 是为了匹配空串,也就是形如:
)
现在刷新页面,可看到页面显示内容
zp8497586rq

Charter schools are small, independent nonprofit entities, and obviously, one month’s revenue can be a big blow to your cash flow, white said Each student will do a eduessayhelper.org/ book talk on a self selected text on imovie

标签: ,
本文连接地址: http://www.fresker.com/archives/515 (转载注明出处)

回复

目前暂无评论

Sorry, 评论已关闭.