这些是我的文件:
urls.py:
from django.conf.urls import patterns, include, url from eiris_wipro.views import * urlpatterns = patterns('', (r'^hello/$',hello), (r'^articles/(?P)/$', restusers), )
views.py: 来自django.http导入HttpResponse
def hello(request): return HttpResponse("Hello new world!") def restusers(request, collection='smthn'): print 'Collection', collection return HttpResponse(collection)
当我尝试击球时http://127.0.0.1:8000/articles/smthn/
,我收到404
错误!!
我应该遗漏一些非常基本的东西.可能是什么?