I'm new to Django and would like to know how to get a variable from a url. I have tried this:
url(r'^(?P<name>)/$', employeedetail, name='employeedetail'),
which goes to this view
def employeedetail(request, name):
return render(request, 'employee/detail.html')
but I get an error: employeedetail() missing 1 required positional argument: 'name'
Is the code wrong or do I need to type in the url in a particular way?