摘要:
先上简单DEMO 使用MYSQL数据库显示数据fromdjango.shortcutsimportrender_to_responseimportMySQLdbdefbook_list(request):db=MySQLdb.connect(user='me',db='mydb',passwd='secret',host='localhost')cursor=db.cursor()cursor.execute('SELECTnameFROMbooksORDERBYname')names=[row[0]forrowi 阅读全文
posted @ 2011-07-11 18:23
超级管理员
阅读(504)
评论(0)
推荐(0)
浙公网安备 33010602011771号