2007年09月04日 星期二 10:23
Á½¸öÄÚÈÝÏàͬµÄÄ£°å¿ÉÊÇÖ»ÄÜÓÐÒ»¸ö±»äÖȾ£¬why???¼±°¡¡«¡« ÄÚÈÝÈçÏ£¬Á½¸öÄ£°åͬ´¦ÓÚÒ»¸öĿ¼{{current_date}}
-------------- 下一部分 -------------- Ò»¸öHTML¸½¼þ±»ÒƳý... URL: http://python.cn/pipermail/python-chinese/attachments/20070904/6fff6a98/attachment.html
2007年09月04日 星期二 10:28
On 9/4/07, klutz chump <chumpklutz在gmail.com> wrote: > > > 两个内容相同的模板可是只能有一个被渲染,why???急啊~~ > 内容如下,两个模板同处于一个目录 > > > >{{current_date}}
> > > 看不出它们之间的关系,如何调用? -- I like python! UliPad <>: http://code.google.com/p/ulipad/ My Blog: http://www.donews.net/limodou
2007年09月04日 星期二 11:20
ÎÒ°ÑÕû¸öproject´ò°üµ½¸½¼þÀïÃæÁË Àîľͷ¼°¸÷λ´óϺ°ï¿´Ò»Ï ÔÚ07-9-4£¬limodou <limodou在gmail.com> дµÀ£º > > On 9/4/07, klutz chump <chumpklutz在gmail.com> wrote: > > > > > > Á½¸öÄÚÈÝÏàͬµÄÄ£°å¿ÉÊÇÖ»ÄÜÓÐÒ»¸ö±»äÖȾ£¬why???¼±°¡¡«¡« > > ÄÚÈÝÈçÏ£¬Á½¸öÄ£°åͬ´¦ÓÚÒ»¸öĿ¼ > > > > > > > >{{current_date}}
> > > > > > > ¿´²»³öËüÃÇÖ®¼äµÄ¹ØÏµ,ÈçºÎµ÷ÓÃ? > > -- > I like python! > UliPad <>: http://code.google.com/p/ulipad/ > 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/20070904/a0ea97f0/attachment.html -------------- 下一部分 -------------- Ò»¸ö·ÇÎı¾¸½¼þ±»Çå³ý... ·¢ÐÅÈË: %(who)s Ö÷Ìâ: %(subject)s ÈÕÆÚ: %(date)s ´óС: 7206 Url: http://python.cn/pipermail/python-chinese/attachments/20070904/a0ea97f0/attachment.obj
2007年09月04日 星期二 11:38
from django.shortcuts import render_to_response
import datetime
def current_date(request):
now=datetime.datetime.now()
#return render_to_response('basett.html',{'current_date':now})
return render_to_response('ttt/base1.html',{'current_date':now})
µÃдÁ½¸öview.дһ¸öviewµÄ»°ÔÚURLsÀïÓòÎÊý½«Ä£°åÃû´«µÝ½øÈ¥
¿´ÏÂÕâÒ»Õ°É
http://hideto.javaeye.com/blog/44288
_____
·¢¼þÈË: python-chinese-bounces在lists.python.cn
[mailto:python-chinese-bounces在lists.python.cn] ´ú±í klutz chump
·¢ËÍʱ¼ä: 2007Äê9ÔÂ4ÈÕ 11:20
ÊÕ¼þÈË: python-chinese在lists.python.cn
Ö÷Ìâ: [python-chinese]Re: [python-chinese] Re: [python-chinese] djangoÄ£°å
î}~~~~~~~
ÎÒ°ÑÕû¸öproject´ò°üµ½¸½¼þÀïÃæÁË
Àîľͷ¼°¸÷λ´óϺ°ï¿´Ò»ÏÂ
ÔÚ07-9-4£¬limodou <limodou在gmail.com> дµÀ£º
On 9/4/07, klutz chump <chumpklutz在gmail.com> wrote:
>
>
> Á½¸öÄÚÈÝÏàͬµÄÄ£°å¿ÉÊÇÖ»ÄÜÓÐÒ»¸ö±»äÖȾ£¬why???¼±°¡¡«¡«
> ÄÚÈÝÈçÏ£¬Á½¸öÄ£°åͬ´¦ÓÚÒ»¸öĿ¼
>
>
>
> {{current_date}}
>
>
>
¿´²»³öËüÃÇÖ®¼äµÄ¹ØÏµ,ÈçºÎµ÷ÓÃ?
--
I like python!
UliPad <>: http://code.google.com/p/ulipad/
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/20070904/952442c2/attachment-0001.html
2007年09月04日 星期二 11:45
On 9/4/07, klutz chump <chumpklutz在gmail.com> wrote: > 我把整个project打包到附件里面了 > > 李木头及各位大虾帮看一下 > 根本无法运行.我使用的是trunk,没有配置数据库,所以报错.TEMPLATE_DIRS配置为了绝对路径,所以换个地方也根本找不到.既然没有配置数据库,所以INSTALLED_APPS中自然不能有什么auth之类的,不然根本过不去.另外最关键的是urls中的now所对应的view模块根本不在附件中. 问题太多了,你怎么测试的?我很奇怪. -- I like python! UliPad <>: http://code.google.com/p/ulipad/ My Blog: http://www.donews.net/limodou
2007年09月04日 星期二 11:48
ÕâÎÒÖªµÀ°¡£¬Äã¸Ä³ÉÕâÑù£º
return render_to_response('basett.html',{'current_date':now})
#return render_to_response('ttt/base1.html',{'current_date':now})
ÎÒÄÇÑùдÊÇÏë°ÑÄ£°å·Ö¿ª±ãÓÚ´ó¼Ò¿´µÄûÓÐÆäËüÒâ˼
ÔÚ07-9-4£¬beck917 <beck917在gmail.com> дµÀ£º
>
> from django.shortcuts import render_to_response
>
> import datetime
>
>
>
> def current_date(request):
>
> now=datetime.datetime.now()
>
> #return render_to_response('basett.html',{'current_date':now})
>
> return render_to_response('ttt/base1.html',{'current_date':now})
>
>
>
> µÃдÁ½¸öview.дһ¸öviewµÄ»°ÔÚURLsÀïÓòÎÊý½«Ä£°åÃû´«µÝ½øÈ¥
>
>
>
> ¿´ÏÂÕâÒ»Õ°É
>
> http://hideto.javaeye.com/blog/44288
> ------------------------------
>
> *·¢¼þÈË:* python-chinese-bounces在lists.python.cn [mailto:
> python-chinese-bounces在lists.python.cn] *´ú±í *klutz chump
> *·¢ËÍʱ¼ä:* 2007Äê9ÔÂ4ÈÕ 11:20
> *ÊÕ¼þÈË:* python-chinese在lists.python.cn
> *Ö÷Ìâ:* [python-chinese]Re: [python-chinese] Re: [python-chinese] djangoÄ£°åî}
> ~~~~~~~
>
>
>
> ÎÒ°ÑÕû¸öproject´ò°üµ½¸½¼þÀïÃæÁË
>
>
>
> Àîľͷ¼°¸÷λ´óϺ°ï¿´Ò»ÏÂ
>
>
>
> ÔÚ07-9-4£¬*limodou* <limodou在gmail.com> дµÀ£º
>
> On 9/4/07, klutz chump <chumpklutz在gmail.com> wrote:
> >
> >
> > Á½¸öÄÚÈÝÏàͬµÄÄ£°å¿ÉÊÇÖ»ÄÜÓÐÒ»¸ö±»äÖȾ£¬why???¼±°¡¡«¡«
> > ÄÚÈÝÈçÏ£¬Á½¸öÄ£°åͬ´¦ÓÚÒ»¸öĿ¼
> >
> >
> >
> > {{current_date}}
> >
> >
> >
> ¿´²»³öËüÃÇÖ®¼äµÄ¹ØÏµ,ÈçºÎµ÷ÓÃ?
>
> --
> I like python!
> UliPad <>: http://code.google.com/p/ulipad/
> 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
>
>
>
> _______________________________________________
> 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/20070904/c0a3354e/attachment.htm
2007年09月04日 星期二 11:51
ÄãÖ»ÐèÒª¸ÄTEMPLATE_DIRS¾Í¿ÉÒÔÁ˰¡ ÎÒûÓÐÓõ½Êý¾Ý¿âҲûÓÐÓÃAPP£¬ÊÓͼдÔÚ view.pyÀïÃæµÄ,ÕâÊÇÒ»¸öСdemo ÔÚ07-9-4£¬limodou <limodou在gmail.com> дµÀ£º > > On 9/4/07, klutz chump <chumpklutz在gmail.com> wrote: > > ÎÒ°ÑÕû¸öproject´ò°üµ½¸½¼þÀïÃæÁË > > > > Àîľͷ¼°¸÷λ´óϺ°ï¿´Ò»Ï > > > ¸ù±¾ÎÞ·¨ÔËÐÐ.ÎÒʹÓõÄÊÇtrunk,ûÓÐÅäÖÃÊý¾Ý¿â,ËùÒÔ±¨´í.TEMPLATE_DIRSÅäÖÃΪÁ˾ø¶Ô·¾¶, > ËùÒÔ»»¸öµØ·½Ò²¸ù±¾ÕÒ²»µ½.¼ÈȻûÓÐÅäÖÃÊý¾Ý¿â,ËùÒÔINSTALLED_APPSÖÐ×ÔÈ»²»ÄÜÓÐʲôauthÖ®ÀàµÄ, > ²»È»¸ù±¾¹ý²»È¥.ÁíÍâ×î¹Ø¼üµÄÊÇurlsÖеÄnowËù¶ÔÓ¦µÄviewÄ£¿é¸ù±¾²»ÔÚ¸½¼þÖÐ. > > ÎÊÌâÌ«¶àÁË,ÄãÔõô²âÊÔµÄ?Î񼆮æ¹Ö. > > -- > I like python! > UliPad <>: http://code.google.com/p/ulipad/ > 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/20070904/7859f9bb/attachment.html
2007年09月04日 星期二 12:23
On 9/4/07, klutz chump <chumpklutz在gmail.com> wrote: > 你只需要改TEMPLATE_DIRS就可以了啊 > > 我没有用到数据库也没有用APP,视图写在 view.py里面的,这是一个小demo > 看不懂你的文件编码? \xff\xfe< 为什么不使用 utf-8来保存? -- I like python! UliPad <>: http://code.google.com/p/ulipad/ My Blog: http://www.donews.net/limodou
2007年09月04日 星期二 12:43
ÎÒµÄÊÇ·±Ìå°æÏµÍ³ ÓпÉÄÜÊÇÄǸö²»ÄÜäÖȾµÄÄǸöÄ£°å±àÂëÓÐÎÊÌâ ÔÚ07-9-4£¬limodou <limodou在gmail.com> дµÀ£º > > On 9/4/07, klutz chump <chumpklutz在gmail.com> wrote: > > ÄãÖ»ÐèÒª¸ÄTEMPLATE_DIRS¾Í¿ÉÒÔÁ˰¡ > > > > ÎÒûÓÐÓõ½Êý¾Ý¿âҲûÓÐÓÃAPP£¬ÊÓͼдÔÚ view.pyÀïÃæµÄ,ÕâÊÇÒ»¸öСdemo > > > ¿´²»¶®ÄãµÄÎļþ±àÂë? \xff\xfe< > Ϊʲô²»Ê¹Óà utf-8À´±£´æ? > > -- > I like python! > UliPad <>: http://code.google.com/p/ulipad/ > 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/20070904/09f0736e/attachment.html
2007年09月04日 星期二 12:53
On 9/4/07, klutz chump <chumpklutz在gmail.com> wrote: > 我的是繁体版系统 > > 有可能是那个不能渲染的那个模板编码有问题 > 改了编码另存后,可以显示信息的,你想要的是什么结果? -- I like python! UliPad <>: http://code.google.com/p/ulipad/ My Blog: http://www.donews.net/limodou
2007年09月04日 星期二 12:56
ÄǸöÄ£°åºÜ¼òµ¥¾ÍÊÇÏÔʾÈÕÆÚ ¿ÉÒÔÁËÂð ÔÚ07-9-4£¬limodou <limodou在gmail.com> дµÀ£º > > On 9/4/07, klutz chump <chumpklutz在gmail.com> wrote: > > ÎÒµÄÊÇ·±Ìå°æÏµÍ³ > > > > ÓпÉÄÜÊÇÄǸö²»ÄÜäÖȾµÄÄǸöÄ£°å±àÂëÓÐÎÊÌâ > > > ¸ÄÁ˱àÂëÁí´æºó,¿ÉÒÔÏÔʾÐÅÏ¢µÄ,ÄãÏëÒªµÄÊÇʲô½á¹û? > > -- > I like python! > UliPad <>: http://code.google.com/p/ulipad/ > 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/20070904/7dd8758e/attachment.html
2007年09月04日 星期二 13:00
On 9/4/07, klutz chump <chumpklutz在gmail.com> wrote: > 那个模板很简单就是显示日期 > > 可以了吗 > 这就是结果: 2007-09-04 12:51:38.177000 -- I like python! UliPad <>: http://code.google.com/p/ulipad/ My Blog: http://www.donews.net/limodou
2007年09月04日 星期二 13:04
ÕâС×ÓÊÇ̨ÍåÈË£¬»¹ÊÇÏã¸ÛN £¿£¿ -------------- 下一部分 -------------- Ò»¸öHTML¸½¼þ±»ÒƳý... URL: http://python.cn/pipermail/python-chinese/attachments/20070904/c2dc4a7a/attachment.htm
2007年09月04日 星期二 13:23
½á¹ûÊÇÕâÑùµÄ¡£ ÀÏÀîÄãÊǸĵÄÄIJ¿·ÖµÄ±àÂ룬°Ñ¸ÄµÄ²¿·ÖÌù³öÀ´ÎÒ¿´¿´°¡ £Ð£Ó£ºÎÒÊÇÒ»¼Ǫ̀Í幫˾µÄ 2007/9/4, limodou <limodou在gmail.com>: > > On 9/4/07, klutz chump <chumpklutz在gmail.com> wrote: > > ÄǸöÄ£°åºÜ¼òµ¥¾ÍÊÇÏÔʾÈÕÆÚ > > > > ¿ÉÒÔÁËÂð > > > Õâ¾ÍÊǽá¹û: > > 2007-09-04 12:51:38.177000 > -- > I like python! > UliPad <>: http://code.google.com/p/ulipad/ > 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/20070904/55a82827/attachment-0001.html
2007年09月04日 星期二 13:27
On 9/4/07, klutz chump <chumpklutz在gmail.com> wrote: > 结果是这样的。 > > 老李你是改的哪部分的编码,把改的部分贴出来我看看啊 > > PS:我是一家台湾公司的 > 就是把base1.html的编码由utf-16改为了utf-8,就可以了. -- I like python! UliPad <>: http://code.google.com/p/ulipad/ My Blog: http://www.donews.net/limodou
Zeuux © 2025
京ICP备05028076号