Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
TastypieのModelResourceから派生したクラスのdehydrateメソッドでログインユーザーを取得したい。
どうやってやるの?
前もって感謝します。
それを見つけた。バンドルに request オブジェクトがあります。
def dehydrate(self,bundle): logged_user = bundle.request.user ... return bundle
これはうまくいきます。