Django-jet: NameError: name 'url' is not defined

Created on 27 Nov 2018  路  3Comments  路  Source: geex-arts/django-jet

settings.py is below
settins file
my urls.py file
urls file

Most helpful comment

Add from django.conf.urls import url to your urls.py file and please add code as actual code next time, screenshots are so annoying, unreproducible and might die on the hosting site making this issue useless.

All 3 comments

Add from django.conf.urls import url to your urls.py file and please add code as actual code next time, screenshots are so annoying, unreproducible and might die on the hosting site making this issue useless.

For me not working, drops the following error:

NameError: name 'include' is not defined

My urls.py:

`from django.contrib import admin
from django.urls import path
from django.conf.urls import url

urlpatterns = [
'',
url(r'^jet/', include('jet.urls', 'jet')), # Django JET URLS
url(r'^admin/', include(admin.site.urls)),
]`

To use 'include' you need import it.

Like this:

from django.urls import path, include

Was this page helpful?
0 / 5 - 0 ratings

Related issues

erayerdin picture erayerdin  路  5Comments

mapleflow picture mapleflow  路  8Comments

Zundrium picture Zundrium  路  9Comments

a1Gupta picture a1Gupta  路  7Comments

annamalaissh picture annamalaissh  路  5Comments