Commit 8efaa339261b07da0e1d4b9f37f3b0d40f0339b6
- Diff rendering mode:
- inline
- side by side
alipi/alipi.py
(0 / 13)
  | |||
432 | 432 | return "empty" | |
433 | 433 | ||
434 | 434 | ||
435 | @app.route('/info', methods=['GET']) | ||
436 | def serve_info(): | ||
437 | coll = g.db['post'] | ||
438 | d = {} | ||
439 | cntr = 0 | ||
440 | for i in coll.find({"about":unquote_plus(request.args['about']),"lang":request.args['lang']}): | ||
441 | i['_id'] = str(i['_id']) | ||
442 | d[cntr] = i | ||
443 | cntr+=1 | ||
444 | response = jsonify(d) | ||
445 | response.headers['Access-Control-Allow-Origin'] = '*' | ||
446 | return response | ||
447 | |||
448 | 435 | ||
449 | 436 | import logging,os | |
450 | 437 | from logging import FileHandler |