So i keep getting this error every time i try to pass a variable in http.
in my template i have a link that contains the variable of a county in a state:
template.html
<li><a href="/main/region/{{cnty}}/">{{ cnty }}</a></li>
when you click the link i guess it goes to the urls file:
urls.py
url(r'^region', views.region, name='region'),
and then it gets picked up by the views file but i keep getting an error for some reason:
views.py
def region(request, cnty):
return render(
request, 'region.html', context={'cnty':cnty},
)
the error says "region() takes 2 arguments 1 given", but i dont understand how im only giving 1 argument?