Python论坛  - 讨论区

标题:[python-chinese] Django的urls中文的问题~

2007年10月27日 星期六 13:24

@@ askfor在gmail.com
星期六 十月 27 13:24:10 HKT 2007

½ñÌìÊÔÁËÏÂÈÃslugFieldÖ§³ÖÖÐÎÄ¡£
¿ªÊ¼ÊÇÏë°ÑURLify.js¸Ä³É°ÑÖÐÎÄÖ±½ÓÓÃencodeURIת»»Ò»Ï¡£
ºóÀ´·¢ÏÖÕâÑùÊDz»¶ÔµÄ¡£¡£ÕâÑùÊý¾Ý¿âÀï´æµÄÊý¾Ý±ä³ÉencodeURIµÄ½á¹ûÁË¡£

slugFieldÒªÖ§³ÖÖÐÎÄ¿ÉÄܵøÄ3¸öµØ·½£º
1, urls.py Æ¥ÅäurlµÄpattern¿ÉÄÜÒª¸Ä³É .+
2, slugFieldÓиöУÑ飬ÏÞÖÆslugFieldÖ»ÄÜÊÇ -\w ,µÃ¸Äµô
3, modelµÄ get_absolute_url ÖУ¬°ÑslugField Óà urllib.quote´¦ÀíÏ¡£ ÎÒÊÇÓÃµÄ quote(
self.slug.encode('utf-8') )

ijЩÇé¿öϵÚ3µã²»¸ÄҲûÎÊÌ⣨¿ÉÄܺÍä¯ÀÀÆ÷Óйأ¿£© ÖÁÉÙIE6ϲ»¸ÄÊÇûÎÊÌâµÄ¡£

On 9/29/07, Singo Huang <singochina在gmail.com > wrote:
>
> ºÃÏñDjangoµÄurls²»ÄÜÖ§³ÖÖÐÎÄ£¬ÎÒ»»Á˸ö×ö·¨°ÉÖÐÎÄת³ÉasciiÂëÒ²²»ÐÐ
> http://localhost:8000/result/%D6%D0%CE%C4/
>
> Óа취¿ÉÒÔ½â¾öÕâ¸öÎÊÌâÂð£¿
> _______________________________________________
> 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/20071027/889b02a0/attachment.html 

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

2007年10月27日 星期六 13:29

@@ askfor在gmail.com
星期六 十月 27 13:29:21 HKT 2007

ÏëÆðÀ´Óà django.utils.http.urlquote()  Õâ¸ö±È½ÏºÃ
On 10/27/07, @@ <askfor在gmail.com> wrote:
>
> ½ñÌìÊÔÁËÏÂÈÃslugFieldÖ§³ÖÖÐÎÄ¡£
> ¿ªÊ¼ÊÇÏë°ÑURLify.js¸Ä³É°ÑÖÐÎÄÖ±½ÓÓÃencodeURIת»»Ò»Ï¡£
> ºóÀ´·¢ÏÖÕâÑùÊDz»¶ÔµÄ¡£¡£ÕâÑùÊý¾Ý¿âÀï´æµÄÊý¾Ý±ä³ÉencodeURIµÄ½á¹ûÁË¡£
>
> slugFieldÒªÖ§³ÖÖÐÎÄ¿ÉÄܵøÄ3¸öµØ·½£º
> 1, urls.py Æ¥ÅäurlµÄpattern¿ÉÄÜÒª¸Ä³É .+
> 2, slugFieldÓиöУÑ飬ÏÞÖÆslugFieldÖ»ÄÜÊÇ -\w ,µÃ¸Äµô
> 3, modelµÄ get_absolute_url ÖУ¬°ÑslugField Óà urllib.quote´¦ÀíÏ¡£ ÎÒÊÇÓÃµÄ quote(
> self.slug.encode('utf-8') )
>
> ijЩÇé¿öϵÚ3µã²»¸ÄҲûÎÊÌ⣨¿ÉÄܺÍä¯ÀÀÆ÷Óйأ¿£© ÖÁÉÙIE6ϲ»¸ÄÊÇûÎÊÌâµÄ¡£
>
>  On 9/29/07, Singo Huang <singochina在gmail.com > wrote:
> >
> > ºÃÏñDjangoµÄurls²»ÄÜÖ§³ÖÖÐÎÄ£¬ÎÒ»»Á˸ö×ö·¨°ÉÖÐÎÄת³ÉasciiÂëÒ²²»ÐÐ
> > http://localhost:8000/result/%D6%D0%CE%C4/
> >
> > Óа취¿ÉÒÔ½â¾öÕâ¸öÎÊÌâÂð£¿
> > _______________________________________________
> > 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/20071027/893ed590/attachment.html 

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

2007年10月27日 星期六 15:58

大郎 iexper在gmail.com
星期六 十月 27 15:58:49 HKT 2007

´Ë·½·¨Îª¼Ñ

On 10/27/07, @@ <askfor在gmail.com> wrote:
>
> ÏëÆðÀ´Óà django.utils.http.urlquote()  Õâ¸ö±È½ÏºÃ
> On 10/27/07, @@ <askfor在gmail.com> wrote:
> >
> > ½ñÌìÊÔÁËÏÂÈÃslugFieldÖ§³ÖÖÐÎÄ¡£
> > ¿ªÊ¼ÊÇÏë°ÑURLify.js¸Ä³É°ÑÖÐÎÄÖ±½ÓÓÃencodeURIת»»Ò»Ï¡£
> > ºóÀ´·¢ÏÖÕâÑùÊDz»¶ÔµÄ¡£¡£ÕâÑùÊý¾Ý¿âÀï´æµÄÊý¾Ý±ä³ÉencodeURIµÄ½á¹ûÁË¡£
> >
> > slugFieldÒªÖ§³ÖÖÐÎÄ¿ÉÄܵøÄ3¸öµØ·½£º
> > 1, urls.py Æ¥ÅäurlµÄpattern¿ÉÄÜÒª¸Ä³É .+
> > 2, slugFieldÓиöУÑ飬ÏÞÖÆslugFieldÖ»ÄÜÊÇ -\w ,µÃ¸Äµô
> > 3, modelµÄ get_absolute_url ÖУ¬°ÑslugField Óà urllib.quote´¦ÀíÏ¡£ ÎÒÊÇÓÃµÄ quote(
> > self.slug.encode('utf-8') )
> >
> > ijЩÇé¿öϵÚ3µã²»¸ÄҲûÎÊÌ⣨¿ÉÄܺÍä¯ÀÀÆ÷Óйأ¿£© ÖÁÉÙIE6ϲ»¸ÄÊÇûÎÊÌâµÄ¡£
> >
> >  On 9/29/07, Singo Huang <singochina在gmail.com > wrote:
> > >
> > > ºÃÏñDjangoµÄurls²»ÄÜÖ§³ÖÖÐÎÄ£¬ÎÒ»»Á˸ö×ö·¨°ÉÖÐÎÄת³ÉasciiÂëÒ²²»ÐÐ
> > > http://localhost:8000/result/%D6%D0%CE%C4/
> > >
> > > Óа취¿ÉÒÔ½â¾öÕâ¸öÎÊÌâÂð£¿
> > > _______________________________________________
> > > 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
>



-- 
×îºÃµÄÍƹã±ãÊÇʵ¼ÊÓ¦ÓÃ, ²¢¼Ó"powered by abc..."
http://groups.google.com/group/python-cn
http://webpy.org
http://twitter.com/qichangxing
Gtalk: iexper(at)gmail.com
-------------- 下一部分 --------------
Ò»¸öHTML¸½¼þ±»ÒƳý...
URL: http://python.cn/pipermail/python-chinese/attachments/20071027/432f6777/attachment.html 

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

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

    你的回复:

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

    Zeuux © 2025

    京ICP备05028076号