I am serving 2 different static directories, when calling app.static a second time I get a warning:
DeprecationWarning: [DEPRECATION v23.3] Duplicate route names detected: __main__.static. In the future, Sanic will enforce uniqueness in route naming.
app = Sanic(__name__)
app.static('/static', str(SCRIPT_DIR.joinpath('static_content').resolve()))
app.static('/static_common', str(SCRIPT_DIR.joinpath('../common_content').resolve()))
I opened a ticket at https://github.com/sanic-org/sanic/issues/2674 and was told to ask in the forums about why this isn’t working.
I looked through the documentation and didn’t see a way to specify 2 different static locations so that a different method name is used. Can someone point me to the documentation or an example the specifies how to do this properly?