Python Forum
NameError: Name 'path' is not defined
Thread Rating:
  • 1 Vote(s) - 1 Average
  • 1
  • 2
  • 3
  • 4
  • 5
NameError: Name 'path' is not defined
#1
Hello folks,
I am completely new in Python programming, and at beginning of the day, I am having some issues.
Hope you guys will help me pass through the issue.

The error shows on my CMD:
path(r'^admin/', admin.site.urls),
NameError: name 'path' is not defined

MySite:
urls.py-AboutUs
Quote:from django.conf.urls import url
from.import views
urlpatterns = [
url(r'^$', views.index, name='index'),
]
views.py
Quote:from django.http import httpresponse

def index(request):
return httpresponse ("<h1>Hello About us</>")
urls.py-My1stDjangoSite
Quote:from django.conf.urls import include, url
from django.contrib import admin
urlpatterns = [
path(r'^admin/', admin.site.urls),
path(r'^aboutus/', include('aboutus.urls')),

IDE: Atom
Reply


Messages In This Thread
NameError: Name 'path' is not defined - by aniyanetworks - Jun-29-2018, 12:28 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  NameError :name 'name' is not defined Suzzy_ 4 19,062 Dec-27-2019, 09:04 AM
Last Post: LeanbridgeTech
  NameError: name 'download' is not defined ntdropper 3 11,416 Jan-13-2018, 07:18 AM
Last Post: snippsat
  NameError: name 'bsObj' is not defined Blue Dog 14 15,864 Oct-24-2016, 08:34 AM
Last Post: Blue Dog

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020