@ -11,6 +11,8 @@ def find_one_or_404(collection, **kwargs):
.. code-block:: python
usercollection = mydb['usercollection']
@app.route("/user/<username>")
def user_profile(username):
userfound = find_one_or_404(usercollection, {"_id": username})