Permalink
Browse files

dropped self.app from init_app

  • Loading branch information...
1 parent 85f7af5 commit 916c382a3ff80610c6058d1856f025c1a6bcb27c Munhitsu committed Aug 29, 2011
Showing with 10 additions and 11 deletions.
  1. +10 −11 flaskext/fbapi/omnivore.py
View
@@ -21,21 +21,20 @@ def __init__(self, app=None):
def init_app(self, app):
- self.app = app
- self.app.config.setdefault('FBAPI_ACCESS_TOKEN_STORAGE', redis.AccessTokenStore)
- assert self.app.config.has_key('FBAPI_SCOPE')
- assert self.app.config.has_key('FBAPI_APP_URI')
- assert self.app.config.has_key('FBAPI_APP_ID')
- assert self.app.config.has_key('FBAPI_APP_SECRET')
+ app.config.setdefault('FBAPI_ACCESS_TOKEN_STORAGE', redis.AccessTokenStore)
+ assert app.config.has_key('FBAPI_SCOPE')
+ assert app.config.has_key('FBAPI_APP_URI')
+ assert app.config.has_key('FBAPI_APP_ID')
+ assert app.config.has_key('FBAPI_APP_SECRET')
- self.initialize_access_token_store()
+ self.initialize_access_token_store(app)
- self.app.teardown_request(self.teardown_request)
- self.app.before_request(self.before_request)
+ app.teardown_request(self.teardown_request)
+ app.before_request(self.before_request)
- def initialize_access_token_store(self):
- self.token_storage = self.app.config['FBAPI_ACCESS_TOKEN_STORAGE'](self.app)
+ def initialize_access_token_store(self, app):
+ self.token_storage = app.config['FBAPI_ACCESS_TOKEN_STORAGE'](self.app)
def before_request(self):

0 comments on commit 916c382

Please sign in to comment.