yourname) • Extract the parameter from the URL urlpatterns += [ url(r'^$', views.index, name='index'), url(r'^sayhellorest/(?P<yourname>\w+)/$', views.sayHelloRest, name='sayHelloRest') ] helloyou/urls.py helloyou/views.py def sayHelloRest(request, yourname): return HttpResponse("Hello %s!" % yourname)