Closed jschewebbn closed 1 year ago
Both routes are named static
, which is why you get that warning. Provide a different name for at least one of them:
app.static('/static', staticdir)
app.static('/static_common', staticdir, name='static_common')
Closing as not a bug. For support issues, please refer to Sanic Community Forums
@Tronic how do I specify another name? "static" is a special function on app. I'm not aware of how to do this. Can you point me at documentation or an example?
This issue has been mentioned on Sanic Community Discussion. There might be relevant details there:
https://community.sanicframework.org/t/using-app-static-twice-reports-a-deprecation-warning/1146/1
Is there an existing issue for this?
Describe the bug
I am serving 2 different static directories, when calling app.static a second time I get a warning:
Code snippet
Expected Behavior
No response
How do you run Sanic?
As a script (
app.run
orSanic.serve
)Operating System
Linux
Sanic Version
v22.12.0
Additional context
No response