Re: pass link value in argument for view

2016-05-12 Thread C. Kirby
use \w+ to capture characters and digits. Also general django practice is 
to end all urls with a slash so:

url(r'^myapp/(?P\w+)/$', views.my_view)

On Thursday, May 12, 2016 at 4:32:20 AM UTC-5, quentin ladrier wrote:
>
> so I have test with an S+ or *  and finally I obtain same error message.
>
> this my first django project
>
> regards
>
> quentin
>
> Le jeudi 12 mai 2016 11:27:21 UTC+2, Tom Evans a écrit :
>>
>> On Wed, May 11, 2016 at 3:28 PM, quentin ladrier  
>> wrote: 
>> > sorry for the delay . I obtain this kind of error message: 
>> > NoReverseMatch at /my_views/my_arg/ . Reverse for 'xxx' with arguments 
>> > '(my_arg,)' and keyword arguments '{}' not found. 1 pattern(s) tried: 
>> > ['my_views/(?P\d+)$'] 
>>
>> \d+ means 1 or more digits (0-9). 'my_arg' doesn't match that. Either 
>> pass a number, or change the regular expression to match the content 
>> of the argument you wish to pass. 
>>
>> Cheers 
>>
>> Tom 
>>
>

-- 
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 django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
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/80a20500-bf21-4b75-8bfe-64d8d0872ef4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: pass link value in argument for view

2016-05-12 Thread quentin ladrier
so I have test with an S+ or *  and finally I obtain same error message.

this my first django project

regards

quentin

Le jeudi 12 mai 2016 11:27:21 UTC+2, Tom Evans a écrit :
>
> On Wed, May 11, 2016 at 3:28 PM, quentin ladrier  > wrote: 
> > sorry for the delay . I obtain this kind of error message: 
> > NoReverseMatch at /my_views/my_arg/ . Reverse for 'xxx' with arguments 
> > '(my_arg,)' and keyword arguments '{}' not found. 1 pattern(s) tried: 
> > ['my_views/(?P\d+)$'] 
>
> \d+ means 1 or more digits (0-9). 'my_arg' doesn't match that. Either 
> pass a number, or change the regular expression to match the content 
> of the argument you wish to pass. 
>
> Cheers 
>
> Tom 
>

-- 
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 django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
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/b67c279b-22cc-41f6-afc7-c6a55049b653%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: pass link value in argument for view

2016-05-12 Thread 'Tom Evans' via Django users
On Wed, May 11, 2016 at 3:28 PM, quentin ladrier  wrote:
> sorry for the delay . I obtain this kind of error message:
> NoReverseMatch at /my_views/my_arg/ . Reverse for 'xxx' with arguments
> '(my_arg,)' and keyword arguments '{}' not found. 1 pattern(s) tried:
> ['my_views/(?P\d+)$']

\d+ means 1 or more digits (0-9). 'my_arg' doesn't match that. Either
pass a number, or change the regular expression to match the content
of the argument you wish to pass.

Cheers

Tom

-- 
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 django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
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/CAFHbX1%2BJ8QX9z-%2BzebBKsA059co9DCYQeN8JkPO%2Bomp7HPnNDQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: pass link value in argument for view

2016-05-11 Thread quentin ladrier
sorry for the delay . I obtain this kind of error message:
NoReverseMatch at /my_views/my_arg/ . Reverse for 'xxx' with arguments 
'(my_arg,)' and keyword arguments '{}' not found. 1 pattern(s) tried: 
['my_views/(?P\d+)$']



Le lundi 9 mai 2016 17:03:56 UTC+2, C. Kirby a écrit :
>
> Please provide the specific error message you are seeing
>
> On Monday, May 9, 2016 at 8:05:20 AM UTC-5, quentin ladrier wrote:
>>
>> hello,
>>
>> I generate in views different link. the value of link is a variable 
>> provide by search fonction.
>> this value change with search result.
>> so when I click to my link I wish my link value pass in argument for the 
>> new view.
>> I have test this kind of structure > myarg %}> {{ myarg}}  
>> with urls like : url(r'^myapp/(?p\*)$', views.my_view)
>> and views like: def my_view(request, myarg).
>> but when I attempt to generate my view some errors about arguments occur 
>> with 1 tried.
>>
>> Can you help me with that or do you have any other way to obtain the same 
>> result ? 
>>
>> thanks for your help,
>>
>> regards,
>>
>>
>>
>>

-- 
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 django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
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/d1d72e59-9016-4b60-a741-d698792973f7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: pass link value in argument for view

2016-05-09 Thread C. Kirby
Please provide the specific error message you are seeing

On Monday, May 9, 2016 at 8:05:20 AM UTC-5, quentin ladrier wrote:
>
> hello,
>
> I generate in views different link. the value of link is a variable 
> provide by search fonction.
> this value change with search result.
> so when I click to my link I wish my link value pass in argument for the 
> new view.
> I have test this kind of structure  myarg %}> {{ myarg}}  
> with urls like : url(r'^myapp/(?p\*)$', views.my_view)
> and views like: def my_view(request, myarg).
> but when I attempt to generate my view some errors about arguments occur 
> with 1 tried.
>
> Can you help me with that or do you have any other way to obtain the same 
> result ? 
>
> thanks for your help,
>
> regards,
>
>
>
>

-- 
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 django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
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/484febf0-7d1e-49c2-8e0d-8d3f3b122e73%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


pass link value in argument for view

2016-05-09 Thread quentin ladrier
hello,

I generate in views different link. the value of link is a variable provide 
by search fonction.
this value change with search result.
so when I click to my link I wish my link value pass in argument for the 
new view.
I have test this kind of structure  {{ myarg}}  
with urls like : url(r'^myapp/(?p\*)$', views.my_view)
and views like: def my_view(request, myarg).
but when I attempt to generate my view some errors about arguments occur 
with 1 tried.

Can you help me with that or do you have any other way to obtain the same 
result ? 

thanks for your help,

regards,



-- 
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 django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
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/1fb73023-69d2-413a-be3e-5ebd81c591a6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.