[Answered ]-NameError: name 'static_url' is not defined

2👍

Try looking at the source. You’ll see that the function static_url is defined in django_summernote.settings.

So, to use it in your settings module you’ll either need to be importing it, or defining it yourself as something like:

def static_url(url):
    return os.path.join(STATIC_URL, url)

0👍

from django.conf.urls.static_url import static_url

if you got error while using static then use this import method
[from django.conf.urls.static import static]

Leave a comment