Commits

Cliff Dyer committed f0971b3

Microdjango is now one file.

Comments (0)

Files changed (3)

+ROOT_URLCONF = __name__
+
+from django.conf.urls.defaults import patterns, url
+from django.http import HttpResponse
+
+urlpatterns = []
+
+def index(request):
+    return HttpResponse(u'Index')
+urlpatterns += patterns('', url(r'^$', index))
+
+
+def test(request, id):
+    return HttpResponse(u'The id is: %d' % int(id))
+urlpatterns += patterns('', url(r'^test/(\d+)/$', test))

settings.py

-ROOT_URLCONF = 'views'

views.py

-from django.conf.urls.defaults import patterns, url
-from django.http import HttpResponse
-
-urlpatterns = []
-
-def index(request):
-    return HttpResponse(u'Index')
-urlpatterns += patterns('', url(r'^$', index))
-
-
-def test(request, id):
-    return HttpResponse(u'The id is: %d' % int(id))
-urlpatterns += patterns('', url(r'^test/(\d+)/$', test))