Home > Software engineering >  NameError: name 'playground' is not defined
NameError: name 'playground' is not defined

Time:09-19

I am beginner. I am trying to learn Django. But I face a problem. I defined app name inside my project file but django did not found it. I am using Atom as a Code Edittor. Please Any one help me..enter image description here this is my code path('playground/',include(playground.urls))

File "C:\Users\Hasan\Documents\Django\STOREPRONT\STOREPRONT\urls.py", line 8, in path('playground/',include(playground.urls)) NameError: name 'playground' is not defined

CodePudding user response:

You have to import playground.urls:

import playground.urls

CodePudding user response:

Do :

include("playground.urls")

Instead of :

include(playground.urls)

CodePudding user response:

Wrap the string in quotes:

path('playground/', include('playground.urls')
  • Related