request logs
This commit is contained in:
parent
aeb87ec272
commit
61096f0c4f
@ -21,13 +21,19 @@ def create_app():
|
||||
twitter_db.init_app(app)
|
||||
campaign_db.init_app(app)
|
||||
|
||||
twitter_db.drop_all(app=app)
|
||||
twitter_db.create_all(app=app)
|
||||
campaign_db.drop_all(app=app)
|
||||
twitter_db.drop_all(app=app)
|
||||
campaign_db.create_all(app=app)
|
||||
|
||||
app.register_blueprint(twitter, url_prefix='/twitter')
|
||||
app.register_blueprint(campaign, url_prefix='/campaign')
|
||||
|
||||
@app.before_request
|
||||
def log_request_info():
|
||||
app.logger.debug('Headers: %s', request.headers)
|
||||
app.logger.debug('Body: %s', request.get_data())
|
||||
|
||||
@app.route('/hello')
|
||||
def hello():
|
||||
return "Hello world!"
|
||||
|
@ -1,4 +1,3 @@
|
||||
import os
|
||||
from requests_oauthlib import OAuth1Session
|
||||
from flask import Blueprint, Response, current_app, request, jsonify
|
||||
from ayct_backend.twitter.models import *
|
||||
|
Loading…
Reference in New Issue
Block a user