Re: URL Patterns for URL Encoding Symbols

2009-07-22 Thread emil0r
> I wish I could specify all the unicode letters (for all other > languages apart from Turkish) as something like \w. Best thing I've come up with is to go over the unicode list and identify which languages you want to support. You then use unichr to construct a regex such as: '[%s-%s]' % (unichr

Re: URL Patterns for URL Encoding Symbols

2009-06-30 Thread Ahmet Emre Aladağ
>     (r'^(?P[-0-9A-Za-z]+)/(?P[-_.0-9A-Za-zıİğĞüÜşŞöÖçÇ ] > +)/$', 'search_in_all_packages') > then >     (u'^(?P[-0-9A-Za-z]+)/(?P[-_.0-9A-Za-zıİğĞüÜşŞöÖçÇ ] > +)/$', 'search_in_all_packages').encode("utf-8") > > but none of them worked. [Typo: misplaced .encode("utf-8") in mail.] I managed t

Re: URL Patterns for URL Encoding Symbols

2009-06-30 Thread Ahmet Emre Aladağ
> > You need to replace the `\w` with something that will match the characters > > you > > want. If you want everything that `\w` matches plus spaces, you should use > > `[\w ]+` (note the space) instead of `\w+`. What about other unicode characters? Such as special characters in other languages

Re: URL Patterns for URL Encoding Symbols

2009-06-11 Thread Andy Dietler
Awesome thanks. I love the Django community. On Jun 11, 7:03 pm, Thomas Sutton wrote: > Hi Andy, > > 2009/6/12 Andy  Dietler : > > > > > > > > > Right now I've got a URL pattern that works for letters and numbers, > > but when a character like %20 gets thrown in it fails. > > > The pattern is th

Re: URL Patterns for URL Encoding Symbols

2009-06-11 Thread Thomas Sutton
Hi Andy, 2009/6/12 Andy Dietler : > > Right now I've got a URL pattern that works for letters and numbers, > but when a character like %20 gets thrown in it fails. > > The pattern is this: > > (r'^(?P\w+)/$', 'detail'), > > Which works when I have: > > domain.com/Friends/ > domain.com/24/ > > bu

URL Patterns for URL Encoding Symbols

2009-06-11 Thread Andy Dietler
Right now I've got a URL pattern that works for letters and numbers, but when a character like %20 gets thrown in it fails. The pattern is this: (r'^(?P\w+)/$', 'detail'), Which works when I have: domain.com/Friends/ domain.com/24/ but not for domain.com/The%20Office/ How do I get it to acc