Question

I can't import the get_url from bottle:

from bottle import get_url

The error is:

Traceback (most recent call last):
  File "./py_test.py", line 4, in <module>
    from bottle import get_url
ImportError: cannot import name get_url

There is no error when I load any other one like: run, post, get, route, view, static_file, template, ...

Was it helpful?

Solution

Bottle doesn't seem to expose a get_url function. It does have a url function, which wraps the Bottle.get_url method for the default application.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top