diff --git a/asl_articles/search.py b/asl_articles/search.py index e99ee4e..011d962 100644 --- a/asl_articles/search.py +++ b/asl_articles/search.py @@ -108,6 +108,15 @@ def search(): # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +@app.route( "/search/publishers", methods=["POST","GET"] ) +def search_publishers(): + """Return all publishers.""" + publs = sorted( Publisher.query.all(), key=lambda p: p.publ_name.lower() ) + results = [ get_publisher_vals( p, True ) for p in publs ] + return jsonify( results ) + +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + @app.route( "/search/publisher/", methods=["POST","GET"] ) def search_publisher( publ_id ): """Search for a publisher.""" diff --git a/web/src/App.js b/web/src/App.js index 930cad7..14671d8 100644 --- a/web/src/App.js +++ b/web/src/App.js @@ -73,6 +73,9 @@ export default class App extends React.Component const menu = ( + this._onSpecialSearch( "/search/publishers" ) } + >Show publishers this._onSpecialSearch( "/search/tag/technique", {randomize:1} ) } >Show technique