fbfeed + sectionreset
This commit is contained in:
@@ -15,12 +15,12 @@ import flask
|
||||
|
||||
#flask.json.JSONEncoder.default = lambda self,obj: ((ArticleSchema().dump(obj)[0]) if isinstance(obj, Article) else None)
|
||||
flask.json.JSONEncoder.default = lambda self,obj: ((obj.__json__()) if isinstance(obj, (Base, Article,CrawlUrl)) else None)
|
||||
|
||||
import controller
|
||||
@article_pages.route("/")
|
||||
@article_pages.route("")
|
||||
@article_pages.route(".json")
|
||||
def index():
|
||||
articles=Article.query.all()
|
||||
articles=controller.get_all()
|
||||
return jsonify(articles=articles)
|
||||
|
||||
@article_pages.route("/<int:id>",methods=['PUT'])
|
||||
|
||||
Reference in New Issue
Block a user