twitter #2
@ -28,11 +28,6 @@ def create_app():
|
|||||||
app.register_blueprint(twitter, url_prefix='/twitter')
|
app.register_blueprint(twitter, url_prefix='/twitter')
|
||||||
app.register_blueprint(campaign, url_prefix='/campaign')
|
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')
|
@app.route('/hello')
|
||||||
def hello():
|
def hello():
|
||||||
return "Hello world!"
|
return "Hello world!"
|
||||||
|
@ -9,6 +9,9 @@ campaign = Blueprint('campaign', __name__)
|
|||||||
|
|
||||||
@campaign.route('/campaign', methods=['GET'])
|
@campaign.route('/campaign', methods=['GET'])
|
||||||
def get_twitter_campaigns():
|
def get_twitter_campaigns():
|
||||||
|
print('Headers: %s', request.headers)
|
||||||
|
print('Body: %s', request.get_data())
|
||||||
|
|
||||||
twitter_campaigns = TwitterCampaign.query.all()
|
twitter_campaigns = TwitterCampaign.query.all()
|
||||||
|
|
||||||
campaigns = []
|
campaigns = []
|
||||||
|
Loading…
Reference in New Issue
Block a user