Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

simple django tutorial, without database (hello world) [closed]

Tags:

django

is there somewhere a tutorial for creating a hello world sample application with django.

like image 233
Omu Avatar asked Feb 14 '11 13:02

Omu


1 Answers

Yes, the third tutorial.

http://docs.djangoproject.com/en/dev/intro/tutorial03/#write-your-first-view
though you have to read up to this point.

URL Conf:

from django.conf.urls.defaults import *

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

View:

from django.http import HttpResponse

def hello_world(request):
    return HttpResponse("Hello, world.")
like image 67
Yuji 'Tomita' Tomita Avatar answered Oct 07 '22 22:10

Yuji 'Tomita' Tomita