2006年12月18日 星期一 16:29
一个HTML附件被移除... URL: http://python.cn/pipermail/python-chinese/attachments/20061218/9ab64da6/attachment.html
2006年12月18日 星期一 16:33
On 12/18/06, leopay <leopay在gmail.com> wrote: > > django版本用的是最新svn下来的 > 在views.py文件中, > def login(request): > from django.contrib.auth.views import login > return login(request,template_name='login.html') > > 为什么把from django.contrib.auth.views import login写到函数外面,即 > from django.contrib.auth.views import login > def login(request): > return login(request,template_name='login.html') > > 就报错,login() got an unexpected keyword argument 'template_name' > 因为从django.contrib.auth.views导入的login与你自已定义的login重复了。 -- I like python! UliPad <>: http://wiki.woodpecker.org.cn/moin/UliPad My Blog: http://www.donews.net/limodou
2006年12月18日 星期一 16:55
º¹£¬µÍ¼¶´íÎó°¡¡£ 2006/12/18, limodou <limodou在gmail.com>: > > On 12/18/06, leopay <leopay在gmail.com> wrote: > > > > django°æ±¾ÓõÄÊÇ×îÐÂsvnÏÂÀ´µÄ > > ÔÚviews.pyÎļþÖУ¬ > > def login(request): > > from django.contrib.auth.views import login > > return login(request,template_name='login.html') > > > > Ϊʲô°Ñfrom django.contrib.auth.views import loginдµ½º¯ÊýÍâÃ棬¼´ > > from django.contrib.auth.views import login > > def login(request): > > return login(request,template_name='login.html') > > > > ¾Í±¨´í£¬login() got an unexpected keyword argument 'template_name' > > > ÒòΪ´Ódjango.contrib.auth.viewsµ¼ÈëµÄloginÓëÄã×ÔÒѶ¨ÒåµÄloginÖظ´ÁË¡£ > > -- > I like python! > UliPad <>: http://wiki.woodpecker.org.cn/moin/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/20061218/a6722edb/attachment.htm
2012年06月29日 星期五 18:57
thank you limodou!
Zeuux © 2024
京ICP备05028076号