urls.py
cherrypy.tree.mount(Hello(),"/",config={})
I want to change the url to something like this..
cherrypy.tree.mount(Hello(),"/{id}",config={})
How can,
import cherrypy class Article(object): @cherrypy.expose def index(self): id = cherrypy.request.params.get("id") return f"Id: {id}"if __name__ == "__main__": cherrypy.tree.mount(Article(),"/{id}",config={}) cherrypy.engine.start() cherrypy.engine.block()