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?

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/7762d655-1ae3-49fa-887a-0ade6bd3c00d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to