We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I am trying to serve static files in a directory. I followed the included examples, and this works:
import hug @hug.static('/static') def static(): return ['.']
However, this does not work:
import hug @hug.static('/static/{filename}') def static(filename:hug.types.text): return ['./'+filename]
Traceback:
File "/home/milan/venv/lib/python3.6/site-packages/hug/routing.py", line 299, in __call__ for directory in api_function(): TypeError: static() missing 1 required positional argument: 'filename'
Is it possible to pass arguments to a hug.static-decorated function?
hug.static
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I am trying to serve static files in a directory. I followed the included examples, and this works:
However, this does not work:
Traceback:
Is it possible to pass arguments to a
hug.static
-decorated function?The text was updated successfully, but these errors were encountered: