As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center提供指导。




已关闭8年。




在某处有使用django创建hello world示例应用程序的教程。

最佳答案

是的,第三个教程。

http://docs.djangoproject.com/en/dev/intro/tutorial03/#write-your-first-view
尽管您现在必须先阅读

URL Conf:

from django.conf.urls.defaults import *

urlpatterns = patterns('',
    (r'^hello_world/$', 'dot.path.to.view.hello_world'),
)

看法:
from django.http import HttpResponse

def hello_world(request):
    return HttpResponse("Hello, world.")

关于django - 简单的django教程,不带数据库(hello world),我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/4992728/

10-16 22:53