Re: scarico() got an unexpected keyword argument 'string'

2016-04-23 Thread Daniel Roseman
On Friday, 22 April 2016 15:41:29 UTC+1, Steven Crockett wrote: > > > def scarico(request, data): > print(data) > > You are expecting two positional arguments, and no keyword arguments. > To properly capture your keyword argument named "my_string" your > definition should be written as: > >

Re: scarico() got an unexpected keyword argument 'string'

2016-04-22 Thread Steven Crockett
Your are capturing a URL parameter and naming it "string". First, I'm going to recommend you call your parameter something other than "string" (although that is a valid name). I will use "my_string" instead, so your url will look like: url(r'^scarico/(?P.+)/$', views.scarico, name='scarico')

scarico() got an unexpected keyword argument 'string'

2016-04-22 Thread 'luca72' via Django users
Hello my view is as follow def scarico(request, data): print(data) . the url is : url(r'^scarico/(?P.+)/$', views.scarico, name='scarico'), the form is Norma Azione {% for data in lista_norme %} {% data %} Scarica {%