Python论坛  - 讨论区

标题:[python-chinese] django的urls 匹配问题,能否匹配所有的大小写?

2007年11月30日 星期五 14:43

1234 mydjango在gmail.com
星期五 十一月 30 14:43:45 HKT 2007

±ÈÈç ÄÜÆ¥Åä  /bbs /BBS /Bbs µÈµÈ¡£¡£¡£¡£¡£
-------------- 下一部分 --------------
Ò»¸öHTML¸½¼þ±»ÒƳý...
URL: http://python.cn/pipermail/python-chinese/attachments/20071130/1779f287/attachment.htm 

[导入自Mailman归档:http://www.zeuux.org/pipermail/zeuux-python]

2007年11月30日 星期五 14:53

昆仑 jackyboy在163.com
星期五 十一月 30 14:53:53 HKT 2007

¾ÍÏñÄãÓʼþÀïÒ»Ñùö¾ÙÈ«²¿Çé¿ö°¡£¡£º£©

¿ª¸öÍæÐ¦£¬±ðÈÓש°¡


2007-11-30 



À¥ÂØ 



·¢¼þÈË£º 1234 
·¢ËÍʱ¼ä£º 2007-11-30  14:43:57 
ÊÕ¼þÈË£º python-chinese在lists.python.cn 
³­ËÍ£º 
Ö÷Ì⣺ [python-chinese] djangoµÄurls Æ¥ÅäÎÊÌ⣬ÄÜ·ñÆ¥ÅäËùÓеĴóСд£¿ 
 
±ÈÈç ÄÜÆ¥Åä  /bbs /BBS /Bbs µÈµÈ¡£¡£¡£¡£¡£
-------------- 下一部分 --------------
Ò»¸öHTML¸½¼þ±»ÒƳý...
URL: http://python.cn/pipermail/python-chinese/attachments/20071130/a3ff953b/attachment-0001.html 

[导入自Mailman归档:http://www.zeuux.org/pipermail/zeuux-python]

2007年11月30日 星期五 14:57

1234 mydjango在gmail.com
星期五 十一月 30 14:57:42 HKT 2007

........... ÄãÕæÓÄĬ°¡¡£¡£¡£


Èç¹û²»ÊÇ/bbs ÊÇ/sdfdsfeijijgifdjgGG ÄãÒªÀÛËÀÎÒ°¡¡£¡£¡£¡£   -__-!!

ÔÚ07-11-30£¬À¥ÂØ <jackyboy在163.com> дµÀ£º
>
>  ¾ÍÏñÄãÓʼþÀïÒ»Ñùö¾ÙÈ«²¿Çé¿ö°¡£¡£º£©
>
> ¿ª¸öÍæÐ¦£¬±ðÈÓש°¡
>
>
> 2007-11-30
> ------------------------------
>  À¥ÂØ
> ------------------------------
>  *·¢¼þÈË£º* 1234
> *·¢ËÍʱ¼ä£º* 2007-11-30  14:43:57
> *ÊÕ¼þÈË£º* python-chinese在lists.python.cn
> *³­ËÍ£º*
> *Ö÷Ì⣺* [python-chinese] djangoµÄurls Æ¥ÅäÎÊÌ⣬ÄÜ·ñÆ¥ÅäËùÓеĴóСд£¿
>  ±ÈÈç ÄÜÆ¥Åä  /bbs /BBS /Bbs µÈµÈ¡£¡£¡£¡£¡£
>
> _______________________________________________
> python-chinese
> Post: send python-chinese在lists.python.cn
> Subscribe: send subscribe to python-chinese-request在lists.python.cn
> Unsubscribe: send unsubscribe to  python-chinese-request在lists.python.cn
> Detail Info: http://python.cn/mailman/listinfo/python-chinese
>
-------------- 下一部分 --------------
Ò»¸öHTML¸½¼þ±»ÒƳý...
URL: http://python.cn/pipermail/python-chinese/attachments/20071130/a21c1052/attachment.htm 

[导入自Mailman归档:http://www.zeuux.org/pipermail/zeuux-python]

2007年11月30日 星期五 16:17

eho eho jiulang.eho在gmail.com
星期五 十一月 30 16:17:13 HKT 2007

µ±È»²»ÐÐÁË£¬Äã¸É´àÏȰÑurl×ö¸öͳһ´¦Àí£¬È»ºóÔÚ´¦ÀíÇëÇó£¬ÕâÑùɶÑù¶¼ÄÜÆ¥ÅäÁË

ÔÚ07-11-30£¬1234 <mydjango在gmail.com> дµÀ£º
>
> ........... ÄãÕæÓÄĬ°¡¡£¡£¡£
>
>
> Èç¹û²»ÊÇ/bbs ÊÇ/sdfdsfeijijgifdjgGG ÄãÒªÀÛËÀÎÒ°¡¡£¡£¡£¡£   -__-!!
>
> ÔÚ07-11-30£¬À¥ÂØ <jackyboy在163.com > дµÀ£º
> >
> >  ¾ÍÏñÄãÓʼþÀïÒ»Ñùö¾ÙÈ«²¿Çé¿ö°¡£¡£º£©
> >
> > ¿ª¸öÍæÐ¦£¬±ðÈÓש°¡
> >
> >
> > 2007-11-30
> > ------------------------------
> >  À¥ÂØ
> > ------------------------------
> >  *·¢¼þÈË£º* 1234
> > *·¢ËÍʱ¼ä£º* 2007-11-30  14:43:57
> > *ÊÕ¼þÈË£º* python-chinese在lists.python.cn
> > *³­ËÍ£º*
> > *Ö÷Ì⣺* [python-chinese] djangoµÄurls Æ¥ÅäÎÊÌ⣬ÄÜ·ñÆ¥ÅäËùÓеĴóСд£¿
> >  ±ÈÈç ÄÜÆ¥Åä  /bbs /BBS /Bbs µÈµÈ¡£¡£¡£¡£¡£
> >
> > _______________________________________________
> > python-chinese
> > Post: send python-chinese在lists.python.cn
> > Subscribe: send subscribe to python-chinese-request在lists.python.cn
> > Unsubscribe: send unsubscribe to
> > python-chinese-request在lists.python.cn
> > Detail Info: http://python.cn/mailman/listinfo/python-chinese
> >
>
>
> _______________________________________________
> python-chinese
> Post: send python-chinese在lists.python.cn
> Subscribe: send subscribe to python-chinese-request在lists.python.cn
> Unsubscribe: send unsubscribe to  python-chinese-request在lists.python.cn
> Detail Info: http://python.cn/mailman/listinfo/python-chinese
>
-------------- 下一部分 --------------
Ò»¸öHTML¸½¼þ±»ÒƳý...
URL: http://python.cn/pipermail/python-chinese/attachments/20071130/0dc43b31/attachment.html 

[导入自Mailman归档:http://www.zeuux.org/pipermail/zeuux-python]

2007年11月30日 星期五 16:41

@@ askfor在gmail.com
星期五 十一月 30 16:41:05 HKT 2007

¿ÉÄܵøÄdjango¡£
´ó¸ÅÊÇÕâÀï°É¡£ÎÒҲû²âÊÔ¡£
core.urlresolvers.py

class RegexURLPattern(object):
    def __init__(self, regex, callback, default_args=None, name=None):
        # regex is a string representing a regular expression.
        # callback is either a string like '
foo.views.news.stories.story_detail'
        # which represents the path to a module and a view function name, or
a
        # callable object (view).
        self.regex = re.compile(regex, re.UNICODE)    #¼Óre.I

On 11/30/07, 1234 <mydjango在gmail.com> wrote:
>
> ........... ÄãÕæÓÄĬ°¡¡£¡£¡£
>
>
> Èç¹û²»ÊÇ/bbs ÊÇ/sdfdsfeijijgifdjgGG ÄãÒªÀÛËÀÎÒ°¡¡£¡£¡£¡£   -__-!!
>
> ÔÚ07-11-30£¬À¥ÂØ <jackyboy在163.com > дµÀ£º
> >
> >  ¾ÍÏñÄãÓʼþÀïÒ»Ñùö¾ÙÈ«²¿Çé¿ö°¡£¡£º£©
> >
> > ¿ª¸öÍæÐ¦£¬±ðÈÓש°¡
> >
> >
> > 2007-11-30
> > ------------------------------
> >  À¥ÂØ
> > ------------------------------
> >  *·¢¼þÈË£º* 1234
> > *·¢ËÍʱ¼ä£º* 2007-11-30  14:43:57
> > *ÊÕ¼þÈË£º* python-chinese在lists.python.cn
> > *³­ËÍ£º*
> > *Ö÷Ì⣺* [python-chinese] djangoµÄurls Æ¥ÅäÎÊÌ⣬ÄÜ·ñÆ¥ÅäËùÓеĴóСд£¿
> >  ±ÈÈç ÄÜÆ¥Åä  /bbs /BBS /Bbs µÈµÈ¡£¡£¡£¡£¡£
> >
> > _______________________________________________
> > python-chinese
> > Post: send python-chinese在lists.python.cn
> > Subscribe: send subscribe to python-chinese-request在lists.python.cn
> > Unsubscribe: send unsubscribe to
> > python-chinese-request在lists.python.cn
> > Detail Info: http://python.cn/mailman/listinfo/python-chinese
> >
>
>
> _______________________________________________
> python-chinese
> Post: send python-chinese在lists.python.cn
> Subscribe: send subscribe to python-chinese-request在lists.python.cn
> Unsubscribe: send unsubscribe to  python-chinese-request在lists.python.cn
> Detail Info: http://python.cn/mailman/listinfo/python-chinese
>
-------------- 下一部分 --------------
Ò»¸öHTML¸½¼þ±»ÒƳý...
URL: http://python.cn/pipermail/python-chinese/attachments/20071130/6bbe626e/attachment.html 

[导入自Mailman归档:http://www.zeuux.org/pipermail/zeuux-python]

2007年11月30日 星期五 17:13

limodou limodou在gmail.com
星期五 十一月 30 17:13:48 HKT 2007

On Nov 30, 2007 4:41 PM, @@ <askfor在gmail.com> wrote:
> 可能得改django。
> 大概是这里吧。我也没测试。
> core.urlresolvers.py
>
> class RegexURLPattern(object):
>     def __init__(self, regex, callback, default_args=None, name=None):
>         # regex is a string representing a regular expression.
>         # callback is either a string like '
> foo.views.news.stories.story_detail'
>         # which represents the path to a module and a view function name, or
> a
>         # callable object (view).
>         self.regex = re.compile (regex, re.UNICODE)    #加re.I
>
>
修改正则式就可以了呀。在正则式前面加(?i)表示忽略大小写。具体的看re模块的文档。

-- 
I like python!
UliPad <>: http://code.google.com/p/ulipad/
meide <>: http://code.google.com/p/meide/
My Blog: http://www.donews.net/limodou

[导入自Mailman归档:http://www.zeuux.org/pipermail/zeuux-python]

2007年11月30日 星期五 17:55

@@ askfor在gmail.com
星期五 十一月 30 17:55:49 HKT 2007

*(?iLmsux)* (One or more letters from the set "i", "L", "m", "s", "u", "x".)
The group matches the empty string; the letters set the corresponding flags
(re.I, re.L, re.M, re.S, re.U, re.X) for the entire regular expression. This
is useful if you wish to include the flags as part of the regular
expression, instead of passing a flag argument to the compile() function.

Note that the (?x) flag changes how the expression is parsed. It should be
used first in the expression string, or after one or more whitespace
characters. If there are non-whitespace characters before the flag, the
results are undefined.


º¹¡£·¢ÌùǰÕÒÁËÏÂÎĵµµÄ£¬½á¹û¿´µÃ²»¹»×Ðϸ¡£


On 11/30/07, limodou <limodou在gmail.com> wrote:
>
> On Nov 30, 2007 4:41 PM, @@ <askfor在gmail.com> wrote:
> > ¿ÉÄܵøÄdjango¡£
> > ´ó¸ÅÊÇÕâÀï°É¡£ÎÒҲû²âÊÔ¡£
> > core.urlresolvers.py
> >
> > class RegexURLPattern(object):
> >     def __init__(self, regex, callback, default_args=None, name=None):
> >         # regex is a string representing a regular expression.
> >         # callback is either a string like '
> > foo.views.news.stories.story_detail'
> >         # which represents the path to a module and a view function
> name, or
> > a
> >         # callable object (view).
> >         self.regex = re.compile (regex, re.UNICODE)    #¼Óre.I
> >
> >
> ÐÞ¸ÄÕýÔòʽ¾Í¿ÉÒÔÁËѽ¡£ÔÚÕýÔòÊ½Ç°Ãæ¼Ó(?i)±íʾºöÂÔ´óСд¡£¾ßÌåµÄ¿´reÄ£¿éµÄÎĵµ¡£
>
> --
> I like python!
> UliPad <>: http://code.google.com/p/ulipad/
> meide <>: http://code.google.com/p/meide/
> My Blog: http://www.donews.net/limodou
> _______________________________________________
> python-chinese
> Post: send python-chinese在lists.python.cn
> Subscribe: send subscribe to python-chinese-request在lists.python.cn
> Unsubscribe: send unsubscribe to  python-chinese-request在lists.python.cn
> Detail Info: http://python.cn/mailman/listinfo/python-chinese
-------------- 下一部分 --------------
Ò»¸öHTML¸½¼þ±»ÒƳý...
URL: http://python.cn/pipermail/python-chinese/attachments/20071130/2395bc01/attachment.html 

[导入自Mailman归档:http://www.zeuux.org/pipermail/zeuux-python]

如下红色区域有误,请重新填写。

    你的回复:

    请 登录 后回复。还没有在Zeuux哲思注册吗?现在 注册 !

    Zeuux © 2025

    京ICP备05028076号