like this: http://127.0.0.1:8000/xxx/123243-1-2-3-0/
urls.py (r"^xxx/(\d+)-([0-4])-([0-4])-([0-4])-([0-4])/$", "polls.views.hello"), polls/views.py def hello(request, s1, s2, s3, s4, s5): return HttpResponse("%s - %s - %s - %s - %s" % (s1, s2, s3, s4, s5)) -- blog: http://chenxiaoyu.org twitter: @nnfish <http://twitter.com/nnfish> On Sat, Oct 9, 2010 at 11:54 AM, newlife <thinkba...@gmail.com> wrote: > In my application ,there is a url like this: > """ > xxx.com/xxx/s1-s2-s3-s4-s5/ > > """ > 1: s1 .. s5 ,they are all numbers; > 2: s1 must be there > 3: the others like "-s2" can be zero to 4 > > how should I write this url??? > > any suggestion is welcome. > > thanks ~ > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To post to this group, send email to django-us...@googlegroups.com. > To unsubscribe from this group, send email to > django-users+unsubscr...@googlegroups.com<django-users%2bunsubscr...@googlegroups.com> > . > For more options, visit this group at > http://groups.google.com/group/django-users?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.