Python论坛  - 讨论区

标题:[python-chinese] 我是个菜鸟,请高手帮帮忙!

2007年05月27日 星期日 02:06

errain2005 errain2005在163.com
星期日 五月 27 02:06:09 HKT 2007

ÔÚѧϰDjango Step by Step
> (Îå)£¬ÒªÓõ½sqliteÁË£¬È¥www.sqlite.org ÏÂÁ˸ö°²×°ÎļþÊÇsqlite3.exe³ÌÐò¡£ÎÒÒ²ÏÂÁËpysqlite2Ä£¿é ¡£
¿ÉÊÇÖ´ÐÐ sqlite3 data.db ʱ£¬¾¹È»Ã»ÓÐdata.dbÎļþÉú³É£¬½Ì³ÌÀïÊÇÒªDATABASE_NAME = './data.db'ÕâÑùÉèÖõģ¬ÎҾͲ»Çå³þϲ½Ôõô°ìÁË¡£ÍøÉÏÓÐÈË˵²»ÓÃ×°sqlite,×°pysqlite2¾Í¿ÉÒÔÁË¡£ÎÒÊÇxpϵͳ¡£
ÎÒÊDzËÄñ£¬Çë´ó¼Ò¶à°ï棡




errain2005
2007-05-27
-------------- 下一部分 --------------
Ò»¸öHTML¸½¼þ±»ÒƳý...
URL: http://python.cn/pipermail/python-chinese/attachments/20070527/d2ee1b1c/attachment.html 

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

2007年05月27日 星期日 08:20

limodou limodou在gmail.com
星期日 五月 27 08:20:36 HKT 2007

On 5/27/07, errain2005 <errain2005在163.com> wrote:
>
>
> 在学习Django Step by Step
> > (五),要用到sqlite了,去www.sqlite.org 下了个安装文件是sqlite3.exe程序。我也下了pysqlite2模块 。
> 可是执行 sqlite3 data.db 时,竟然没有data.db文件生成,教程里是要DATABASE_NAME =
> './data.db'这样设置的,我就不清楚下步怎么办了。网上有人说不用装sqlite,装pysqlite2就可以了。我是xp系统。
> 我是菜鸟,请大家多帮忙!
>
不用安装sqlite3.exe。按教程执行manage.py syncdb就可以了。

-- 
I like python!
UliPad <>: http://wiki.woodpecker.org.cn/moin/UliPad
My Blog: http://www.donews.net/limodou

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

2007年05月27日 星期日 12:00

errain2005 errain2005在163.com
星期日 五月 27 12:00:18 HKT 2007

ÌìÄÄ£¬limodouÀÏ´ó¾¹È»¸øÎÒ½â´ð£¬Ì«¼¤¶¯ÁË£¡ÄãÔÚÎÒÐÄÖоÍÊÇÉñѽ£¡Ï£ÍûÔÚÎÒѧϰµÄ·ÉÏ¶à¸øÎҵȲËÄñ°ïÖú£¬ÔٴθÐл£¡£¡£¡




errain2005
2007-05-27



·¢¼þÈË£º limodou
·¢ËÍʱ¼ä£º 2007-05-27 08:21:10
ÊÕ¼þÈË£º python-chinese在lists.python.cn
³­ËÍ£º 
Ö÷Ì⣺ Re: [python-chinese]ÎÒÊǸö²ËÄñ£¬Çë¸ßÊÖ°ï°ï棡

On 5/27/07, errain2005  <errain2005在163.com > wrote:
>
>
> ÔÚѧϰDjango Step by Step
>  > (Îå)£¬ÒªÓõ½sqliteÁË£¬È¥www.sqlite.org ÏÂÁ˸ö°²×°ÎļþÊÇsqlite3.exe³ÌÐò¡£ÎÒÒ²ÏÂÁËpysqlite2Ä£¿é ¡£
> ¿ÉÊÇÖ´ÐÐ sqlite3 data.db ʱ£¬¾¹È»Ã»ÓÐdata.dbÎļþÉú³É£¬½Ì³ÌÀïÊÇÒªDATABASE_NAME =
> './data.db'ÕâÑùÉèÖõģ¬ÎҾͲ»Çå³þϲ½Ôõô°ìÁË¡£ÍøÉÏÓÐÈË˵²»ÓÃ×°sqlite,×°pysqlite2¾Í¿ÉÒÔÁË¡£ÎÒÊÇxpϵͳ¡£
> ÎÒÊDzËÄñ£¬Çë´ó¼Ò¶à°ï棡
>
²»Óð²×°sqlite3.exe¡£°´½Ì³ÌÖ´ÐÐmanage.py syncdb¾Í¿ÉÒÔÁË¡£

-- 
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/20070527/1d27e020/attachment.html 

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

2007年05月27日 星期日 13:31

大郎 iexper在gmail.com
星期日 五月 27 13:31:33 HKT 2007

Èç¹ûÒªÃüÁîÐÐÏÂʹÓÃsqlite£¬¾ÍÐèÒª°²×°£¬ËùνµÄ°²×°£¬ÊÇÖ±½ÓÏÂÔØsqlite3.exe·Åµ½»·¾³±äÁ¿ËùÔÚµÄĿ¼Ï¼´¿É¡£
ÎÒÔÚʵ¼ÊÓõ½Ê±£¬Ö»ÊÇÓÃËûÀ´´´½¨DBÊý¾Ý¿â¶øÒÑ£¬ÆäËûµÄʱºò»¹Ã»ÓÐÓõ½¡£


On 5/27/07, errain2005 <errain2005在163.com> wrote:
>
>  ÌìÄÄ£¬limodouÀÏ´ó¾¹È»¸øÎÒ½â´ð£¬Ì«¼¤¶¯ÁË£¡ÄãÔÚÎÒÐÄÖоÍÊÇÉñѽ£¡Ï£ÍûÔÚÎÒѧϰµÄ·ÉÏ¶à¸øÎҵȲËÄñ°ïÖú£¬ÔٴθÐл£¡£¡£¡
>
>  ------------------------------
>  errain2005
> 2007-05-27
>  ------------------------------
>  *·¢¼þÈË£º* limodou
> *·¢ËÍʱ¼ä£º* 2007-05-27 08:21:10
> *ÊÕ¼þÈË£º* python-chinese在lists.python.cn
> *³­ËÍ£º*
> *Ö÷Ì⣺* Re: [python-chinese]ÎÒÊǸö²ËÄñ£¬Çë¸ßÊÖ°ï°ï棡
>
>  On 5/27/07, errain2005  <errain2005在163.com > wrote:
> >
> >
> > ÔÚѧϰDjango Step by Step
> >  > (Îå)£¬ÒªÓõ½sqliteÁË£¬È¥www.sqlite.org ÏÂÁ˸ö°²×°ÎļþÊÇsqlite3.exe³ÌÐò
> ¡£ÎÒÒ²ÏÂÁËpysqlite2Ä£¿é ¡£
> > ¿ÉÊÇÖ´ÐÐ sqlite3 data.db ʱ£¬¾¹È»Ã»ÓÐdata.dbÎļþÉú³É£¬½Ì³ÌÀïÊÇÒªDATABASE_NAME =
> > './data.db'ÕâÑùÉèÖõģ¬ÎҾͲ»Çå³þϲ½Ôõô°ìÁË¡£ÍøÉÏÓÐÈË˵²»ÓÃ×°sqlite,×°pysqlite2¾Í¿ÉÒÔÁË¡£ÎÒÊÇxpϵͳ¡£
> > ÎÒÊDzËÄñ£¬Çë´ó¼Ò¶à°ï棡
> >
> ²»Óð²×°sqlite3.exe¡£°´½Ì³ÌÖ´ÐÐmanage.py syncdb¾Í¿ÉÒÔÁË¡£
>
> --
> 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
>
> _______________________________________________
> 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/20070527/2f753fcd/attachment.html 

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

2007年05月27日 星期日 14:08

limodou limodou在gmail.com
星期日 五月 27 14:08:40 HKT 2007

On 5/27/07, errain2005 <errain2005在163.com> wrote:
>
>
> 天哪,limodou老大竟然给我解答,太激动了!你在我心中就是神呀!希望在我学习的路上多给我等菜鸟帮助,再次感谢!!!

太夸张了吧。这里许多人都很热情的,不止我一个。

-- 
I like python!
UliPad <>: http://wiki.woodpecker.org.cn/moin/UliPad
My Blog: http://www.donews.net/limodou

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

2007年05月27日 星期日 14:12

风向标 vaneoooo在gmail.com
星期日 五月 27 14:12:13 HKT 2007

¹þ¹þ¡£ÄǸоõ°Ë³ÉºÍ²ÜÑ©ÇÛºÍÄã̽ÌÖºìѧ£¬Ç®ÖÓÊéΪÄãΧ³Ç½â»óËÆµÄ°É£¿
ÅÜÁËÏÂÌ⣺£©
-------------- 下一部分 --------------
Ò»¸öHTML¸½¼þ±»ÒƳý...
URL: http://python.cn/pipermail/python-chinese/attachments/20070527/0aa5087a/attachment.html 

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

2007年05月27日 星期日 14:18

errain2005 errain2005在163.com
星期日 五月 27 14:18:43 HKT 2007

第五步还是没搞定,急死了。pysqlite要安装在哪个目录,怎么安装呢?

总是出现这样错误页面:
AttributeError at /login/
'WSGIRequest' object has no attribute 'session'
Request Method:GET
Request URL:http://127.0.0.1:8000/login/
Exception Type:AttributeError
Exception Value:'WSGIRequest' object has no attribute 'session'
Exception Location:C:\Python25\lib\site-packages\django-0.95.1-py2.5.egg\django\core\handlers\base.py in get_response, line 74

Traceback (innermost last)
Switch to copy-and-paste view


C:\Python25\lib\site-packages\django-0.95.1-py2.5.egg\django\core\handlers\base.py in get_response 
# Apply view middleware
for middleware_method in self._view_middleware:
response = middleware_method(request, callback, callback_args, callback_kwargs)
if response:
return response

try:
response = callback(request, *callback_args, **callback_kwargs) ...
except Exception, e:
# If the view raised an exception, run it through exception
# middleware, and if the exception middleware returns a
# response, use that. Otherwise, reraise the exception.
for middleware_method in self._exception_middleware:
response = middleware_method(request, e)
▶ Local vars 
VariableValue
callback
callback_args()
callback_kwargs{}
eAttributeError("'WSGIRequest' object has no attribute 'session'",)
exceptions
mail_admins
middleware_method>
path'/login/'
request, POST:, COOKIES:{}, META:{'ALLUSERSPROFILE': 'C:\\Documents and Settings\\All Users', 'APPDATA': 'C:\\Documents and Settings\\Administrator\\Application Data', 'CLIENTNAME': 'Console', 'COMMONPROGRAMFILES': 'C:\\Program Files\\Common Files', 'COMPUTERNAME': 'ECISYDQ253ZX1X', 'COMSPEC': 'C:\\WINDOWS\\system32\\cmd.exe', 'CONTENT_LENGTH': '', 'CONTENT_TYPE': 'text/plain', 'DJANGO_SETTINGS_MODULE': 'newtest.settings', 'FP_NO_HOST_CHECK': 'NO', 'GATEWAY_INTERFACE': 'CGI/1.1', 'HOMEDRIVE': 'C:', 'HOMEPATH': '\\Documents and Settings\\Administrator', 'HTTP_ACCEPT': '*/*', 'HTTP_ACCEPT_ENCODING': 'gzip, deflate', 'HTTP_ACCEPT_LANGUAGE': 'zh-cn', 'HTTP_CONNECTION': 'Keep-Alive', 'HTTP_HOST': '127.0.0.1:8000', 'HTTP_USER_AGENT': 'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 2.0.50727)', 'JAVA_PLUGIN_WEBCONTROL_ENABLE': 'TRUE', 'LOGONSERVER': '\\\\ECISYDQ253ZX1X', 'NUMBER_OF_PROCESSORS': '1', 'OS': 'Windows_NT', 'PATH': 'C:\\WINDOWS\\system32;C:\\WINDOWS;C:\\WINDOWS\\System32\\Wbem;C:\\Program Files\\Microsoft SQL Server\\90\\Tools\\binn\\;C:\\Python25;C:\\Python25\\Scripts;E:\\3dsmax5\\backburner2\\;C:\\Program Files\\Common Files\\Autodesk Shared\\', 'PATHEXT': '.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH', 'PATH_INFO': '/login/', 'PROCESSOR_ARCHITECTURE': 'x86', 'PROCESSOR_IDENTIFIER': 'x86 Family 6 Model 13 Stepping 8, GenuineIntel', 'PROCESSOR_LEVEL': '6', 'PROCESSOR_REVISION': '0d08', 'PROGRAMFILES': 'C:\\Program Files', 'PROMPT': '$P$G', 'QUERY_STRING': '', 'REMOTE_ADDR': '127.0.0.1', 'REMOTE_HOST': 'update.111222.cn', 'REQUEST_METHOD': 'GET', 'RUN_MAIN': 'true', 'SCRIPT_NAME': '', 'SERVER_NAME': 'update.111222.cn', 'SERVER_PORT': '8000', 'SERVER_PROTOCOL': 'HTTP/1.1', 'SERVER_SOFTWARE': 'WSGIServer/0.1 Python/2.5', 'SESSIONNAME': 'Console', 'SYSTEMDRIVE': 'C:', 'SYSTEMROOT': 'C:\\WINDOWS', 'TEMP': 'C:\\DOCUME~1\\ADMINI~1\\LOCALS~1\\Temp', 'TMP': 'C:\\DOCUME~1\\ADMINI~1\\LOCALS~1\\Temp', 'TZ': 'America/Chicago', 'USERDOMAIN': 'ECISYDQ253ZX1X', 'USERNAME': 'eisai', 'USERPROFILE': 'C:\\Documents and Settings\\Administrator', 'VS80COMNTOOLS': 'C:\\Program Files\\Microsoft Visual Studio 8\\Common7\\Tools\\', 'WINDIR': 'C:\\WINDOWS', 'wsgi.errors': ', mode 'w' at 0x00B6F0B0>, 'wsgi.file_wrapper': , 'wsgi.input': , 'wsgi.multiprocess': False, 'wsgi.multithread': True, 'wsgi.run_once': False, 'wsgi.url_scheme': 'http', 'wsgi.version': (1, 0)}>
resolver
responseNone
self
settings
urlresolvers

Traceback (most recent call last):
File "C:\Python25\lib\site-packages\django-0.95.1-py2.5.egg\django\core\handlers\base.py" in get_response
  74. response = callback(request, *callback_args, **callback_kwargs)

  AttributeError at /login/
  'WSGIRequest' object has no attribute 'session' 

Request information
GET
No GET data
POST
No POST data
COOKIES
No cookie data




errain2005
2007-05-27



发件人: limodou
发送时间: 2007-05-27 14:09:03
收件人: python-chinese在lists.python.cn
抄送: 
主题: Re: [python-chinese]我是个菜鸟,请高手帮帮忙!

On 5/27/07, errain2005  <errain2005在163.com > wrote:
>
>
> 天哪,limodou老大竟然给我解答,太激动了!你在我心中就是神呀!希望在我学习的路上多给我等菜鸟帮助,再次感谢!!!

太夸张了吧。这里许多人都很热情的,不止我一个。

-- 
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/20070527/bfa9f340/attachment.htm 

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

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

    你的回复:

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

    Zeuux © 2025

    京ICP备05028076号