Hi Lucas,

Thank you very much. It seems that I can use this. Hopefully, I can ask you 
one more question. 

\d+ is for a int. 
is \w+ for a string?  
What does \w* mean? I saw it. 

Jun

2014年5月21日水曜日 11時49分46秒 UTC+9 Lucas Klassmann:
>
> Hi Jun,
>
> Try this:
>
> Put only this line in urls.py
>
> url(r'^link/(?P<*identifier*>\d+)/$', 'project.apps.main.get'),
>
>
>  And in your view, add *identifier* as argument in function:
>
> def get(request, *identifier*):
>     ...
>     return HttpResponse(u'Identifier %d' % *identifier*)
>
> Note that *identifier* is a *int* and you must use link as */link/1*
>
> Read more:
> https://docs.djangoproject.com/en/dev/topics/http/urls/
>
> Cheers.
>
> -- 
> Lucas Klassmann
> Software Developer
> Email: lucaskl...@gmail.com <javascript:>
> Web site: http://www.lucasklassmann.com
>  

-- 
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 http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/1fc15ca2-d8a5-4856-b14e-be5eefa9225b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to