Please help me to solve the error

32 views
Skip to first unread message

Manas Sanas

unread,
Sep 1, 2019, 9:38:26 AM9/1/19
to Django users
There is an error when i add url to url.py. The url.py file is as follow-
from django.contrib import admin
from django.urls import path, include


urlpatterns = [
path('admin/', admin.site.urls),
path('polls/', include('polls.urls')),
]
when i run the code in terminal : 'python manage.py runserver' ; then the follwing error is displayed in the terminal -

django.core.exceptions.ImproperlyConfigured: The included URLconf '<module 'polls.urls' from 'C:\\Users\\Administrator\\PycharmProjects\\website2\\mysite\\polls\\urls.py'>' does
not appear to have any patterns in it. If you see valid patterns in the file then the issue is probably caused by a circular import.

Please help me to solve the error

Regards,
Django user

Sebastian Jung

unread,
Sep 1, 2019, 9:40:59 AM9/1/19
to django...@googlegroups.com
Hello,

You must create another url.py under your App polls.

Regards

--
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...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/e77ae50b-dbdb-447a-9e91-b04e996197c9%40googlegroups.com.

Gabriel Araya Garcia

unread,
Sep 1, 2019, 12:01:46 PM9/1/19
to django...@googlegroups.com
Manas:
Recuerda que existen dos  urlpatterns, una exterior y otra que está en la carpeta de tu APLICACION, ojo con eso. La exterior es la que direcciona al ADMIN y la otra es la que define la ubicacion de las URLS de tu aplicacion, yo creo que esta ultima no la has construido.

Keep in mind that there are two URLPATTERNS one exterior and the other inside of your aplication (app). The exterior give us the address to ADMIN and the other is where will be all PATH's of your project.



--
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...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/e77ae50b-dbdb-447a-9e91-b04e996197c9%40googlegroups.com.


--
Gabriel Araya Garcia
GMI - Desarrollo de Sistemas Informáticos
99.7721.15.70

Reply all
Reply to author
Forward
0 new messages