Tuesday, May 28, 2019

URL conf error

from django.conf.urls import URLPattern, url, include
from . import views

urlpatterns = [
url('^$', views.index, name=index),
]
"""website URL Configuration

The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/2.2/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
Class-based views
1. Add an import: from other_app.views import Home
2. Add a URL to urlpatterns: path('', Home.as_view(), name='home')
Including another URLconf
1. Import the include() function: from django.urls import include, path
2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
"""
from django.contrib import admin
from django.urls import path, include, url

urlpatterns = [
path('admin/', admin.site.urls),
path('music/', include('music.urls')),
]

I am getting the url conf error. I  have attached the relevant files. Thanks for the assistance

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/37eedb50-637a-45bf-839a-cbe52a410f4e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment