develop
gwen 2 years ago
parent 0024ee3231
commit 7537386a7d

@ -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})

Loading…
Cancel
Save