Python论坛  - 讨论区

标题:[python-chinese] django中psycopg2连接postgresql测试时出现的问题

2007年04月28日 星期六 19:32

li liren bjfullr在gmail.com
星期六 四月 28 19:32:11 HKT 2007

ÔÚdjangoÖÐÎÒÓÃpsycopg2Á¬½Ópostgresql
ÎÒ²âÊÔÒ»ÏÂÊý¾Ý¿âÅäÖãº
>>> from django.db import connnection
>>> cursor = connection.cursor()
³öÏÖÁËÏÂÁеÄÌáʾ£º

psyco_connect: dsn = 'user=**** dbname=test password='********''
connection_setup: init connection object at 01460568, refcnt = 1
conn_connect: new postgresql connection at 0144F150
conn_connect: using protocol 2
connection_setup: good connection object at 01460568, refcnt = 1
Traceback (most recent call last):
  File "", line 1, in 
  File
"C:\Python25\lib\site-packages\django\db\backends\postgresql_psycopg2\bas
e.py", line 50, in cursor
    self.connection.set_isolation_level(1) # make transactions transparent
to al
l cursors
AttributeError: 'psycopg2._psycopg.connection' object has no attribute
'set_isol
ation_level'
ÊÇʲôÎÊÌ⣬Òà»òÊÇbug
Íû´Í½Ì
-------------- 下一部分 --------------
Ò»¸öHTML¸½¼þ±»ÒƳý...
URL: http://python.cn/pipermail/python-chinese/attachments/20070428/cc47d71c/attachment.htm 

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

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

    你的回复:

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

    Zeuux © 2025

    京ICP备05028076号