peewee

    2熱度

    2回答

    我被困了有關查詢使用Peewee多個數據庫的問題: 我有2個現有的MySQL數據庫(讓我們命名他們A和B)(結構是相似的,因爲它是由兩個的Bugzilla數據庫) 我使用Pwiz 生成模型(modelsA.py和modelsB.py)我寫這篇文章的代碼: 。 from modelsA import * from modelsB import * 的問題是:在modelsB的類(有時)比mod

    1熱度

    1回答

    我使用量瓶中,用Peewee ORM在我所定義的,像這樣的兩個表: class Ticket(db.Model): created = DateTimeField(default=datetime.now) customer_uuid = CharField() # the customer's UUID gotten from App. More info comes fro

    0熱度

    1回答

    我試圖用服務器上的peewee運行我的應用程序,並且它不斷崩潰。 要開始啓動函數被調用在main.py應用: def start(db_name, db_user, db_pass): BaseModel.initialize_database(db_name, db_user, db_pass) classA.create_table() classB.create

    2熱度

    2回答

    嗨,我正在使用Flask Peewee並嘗試更新merchant_details模型,但它不起作用。 以下是錯誤我得到: AttributeError: 'SelectQuery' object has no attribute 'update' mdetails = merchant_details.filter(merchant_details.merchant_id==session['us

    13熱度

    1回答

    我對此進行了各種研究,似乎無法找到答案。我希望我沒有重複這個(因爲這是我的第一個問題)。 我想寫一個通常會去的Peewee選擇查詢... WHERE foo = NULL;在SQL世界。 MySQL的是這樣的: +-----------+-------------+------+-----+---------+----------------+ | Field | Type | Null |

    3熱度

    1回答

    我有下面的示例代碼,它使用MongoEngine和Peewee作爲DB後端。 import mongoengine, peewee from mongomodels import * from mysqlmodels import * class Parser(object): def __init__(self, line, dbBackend): if dbBa

    1熱度

    1回答

    當我在讀peewee docs,我發現了一個令人吃驚的說法: # python code messages = Message.select().where( Message.user << user.following() ) 哇,可以有人請解釋這是什麼做的?我知道<<只是一個lshift(左移)運算符(它將二進制表示留給整數,類似的行爲適用於右移),但我不知道這可以處理列表(u

    7熱度

    1回答

    我想從peewee單獨的表中選擇兩個字段。我相信我的問題是迭代結果對象。 我在Python下面的代碼: sHeader_Value = (System_Headers .select(System_Headers.SystemHeader_Name, System_Data.System_Value) .join(System_Header_Link) .join(S

    0熱度

    1回答

    正試圖爲用戶註冊創建一個應用程序,只要我嘗試在數據庫中插入值,它會顯示一個錯誤: - TypeError:object()不帶參數。 views.py @app.route('/join/' , methods=['GET','POST']) def join(): if request.method == 'POST' and request.form['username']:

    4熱度

    1回答

    我正在爲App.net創建一個iOS客戶端,我試圖設置推送通知服務器。目前我的應用程序可以將用戶的App.net帳戶ID(一串數字)和APNS設備令牌添加到我的服務器上的MySQL數據庫中。它也可以刪除這些數據。我已經適應代碼來自這兩個教程: How To Write A Simple PHP/MySQL Web Service for an iOS App - raywenderlich.com