2011-11-16から1日間の記事一覧

flask_peeweeのRestAPIでadminユーザーのみに更新を許可する

flask_peeweeのRestAPIで、adminユーザーのみに更新を許可するにはAdminAuthenticationを使用します。 from flaskext.rest import AdminAuthentication auth = Auth(app, db, user_model=User) # ユーザー認証をRestAPIに設定する user_auth = UserAuthentic…