Hi @gi0baro . The following works fine (for docs)
@mymodule.route("/profile(/<int:user_id>)?")
def profile(user_id):
if user_id:
# get requested user
else:
# load current logged user profile
But if I want to use it in the home of the module, it fails:
@mymodule.route("/(<int:user_id>)?")
def index(user_id):
if user_id:
# get requested user
else:
# load current logged user profile
http://127.0.0.1:8000/mymodule/ or http://127.0.0.1:8000/mymodule/1
I get Resource not found
Jose
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too