# Django-urls error

**URL:** <https://forum.djangoproject.com/t/django-urls-error/28959>\
**Category:** Mystery Errors\
**Created:** [March 11, 2024, 1:36pm UTC](https://forum.djangoproject.com/t/django-urls-error/28959 "2024-03-11T13:36:53Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![etimonuk](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/etimonuk/32/19809_2.png) [@etimonuk](https://forum.djangoproject.com/u/etimonuk)\
**Post date:** [March 11, 2024, 1:36pm UTC](https://forum.djangoproject.com/t/django-urls-error/28959/1 "2024-03-11T13:36:53Z")

</div>

raise ImproperlyConfigured(msg.format(name=self.urlconf\_name)) from e  
django.core.exceptions.ImproperlyConfigured: The included URLconf ‘myproject.urls’ does not appear to have any patterns in it. If you see the ‘urlpatterns’ variable with valid patterns in the file then the issue is probably caused by a circular import.

I am getting this error when trying to runserver in my beginner follow up project.

`path('', include('myapp.urls'))`  
it comes when I include the above code in my projects.urls file. I suggest the issue is from the views.py file.  
Any Help pls?

---

<div class="post-metadata">

**Author:** ![KenWhitesell](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/kenwhitesell/32/280_2.png) [@KenWhitesell](https://forum.djangoproject.com/u/KenWhitesell)\
**Post date:** [March 11, 2024, 1:52pm UTC](https://forum.djangoproject.com/t/django-urls-error/28959/2 "2024-03-11T13:52:45Z")

</div>

Please post the _complete_ urls.py file along with identifying its file name. Also post your `myapp` `urls.py` file.

Note: When posting code here, enclose the code between lines of three backtick - ` characters. This means you’ll have a line of ```, then your code, then another line of ```. This forces the forum software to keep your code properly formatted.

---

<div class="post-metadata">

**Author:** ![etimonuk](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/etimonuk/32/19809_2.png) [@etimonuk](https://forum.djangoproject.com/u/etimonuk)\
**Post date:** [March 11, 2024, 7:40pm UTC](https://forum.djangoproject.com/t/django-urls-error/28959/3 "2024-03-11T19:40:26Z")

</div>

This is myproject urls.py

````from
from django.urls import path, include

urls_patterns = [
    path('admin/', admin.site.urls),
    path('', include('myapp.urls')),
]```
````

---

<div class="post-metadata">

**Author:** ![KenWhitesell](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/kenwhitesell/32/280_2.png) [@KenWhitesell](https://forum.djangoproject.com/u/KenWhitesell)\
**Post date:** [March 11, 2024, 7:43pm UTC](https://forum.djangoproject.com/t/django-urls-error/28959/4 "2024-03-11T19:43:14Z")

</div>

See the docs at [URL dispatcher | Django documentation | Django](https://docs.djangoproject.com/en/5.0/topics/http/urls/#how-django-processes-a-request) and the examples at [Writing your first Django app, part 1 | Django documentation | Django](https://docs.djangoproject.com/en/5.0/intro/tutorial01/) to see what the urls.py file needs to look like.

---

<div class="post-metadata">

**Author:** ![etimonuk](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/etimonuk/32/19809_2.png) [@etimonuk](https://forum.djangoproject.com/u/etimonuk)\
**Post date:** [March 11, 2024, 8:14pm UTC](https://forum.djangoproject.com/t/django-urls-error/28959/5 "2024-03-11T20:14:39Z")

</div>

I have gone through the documentation link and my Project code looks similar with the documentation sample Project.

---

<div class="post-metadata">

**Author:** ![antoinehumbert](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/antoinehumbert/32/14851_2.png) [@antoinehumbert](https://forum.djangoproject.com/u/antoinehumbert)\
**Post date:** [March 11, 2024, 8:15pm UTC](https://forum.djangoproject.com/t/django-urls-error/28959/6 "2024-03-11T20:15:56Z")

</div>

You have to correct the variable name as mentioned in the exception and the documentation mentioned in previous answer:

`urls_patterns` → `urlpatterns`

---

<div class="post-metadata">

**Author:** ![etimonuk](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/etimonuk/32/19809_2.png) [@etimonuk](https://forum.djangoproject.com/u/etimonuk)\
**Post date:** [March 11, 2024, 8:17pm UTC](https://forum.djangoproject.com/t/django-urls-error/28959/7 "2024-03-11T20:17:45Z")

</div>

Thank you. This Worked!

---

<div class="post-metadata">

**Author:** ![etimonuk](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/etimonuk/32/19809_2.png) [@etimonuk](https://forum.djangoproject.com/u/etimonuk)\
**Post date:** [March 12, 2024, 7:58am UTC](https://forum.djangoproject.com/t/django-urls-error/28959/8 "2024-03-12T07:58:03Z")

</div>

In the Django framework urls.py the urlspatterns was spelt as it is why do we need to change it afterwards to urls\_patterns

-

---

<div class="post-metadata">

**Author:** ![KenWhitesell](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/kenwhitesell/32/280_2.png) [@KenWhitesell](https://forum.djangoproject.com/u/KenWhitesell)\
**Post date:** [March 12, 2024, 11:50am UTC](https://forum.djangoproject.com/t/django-urls-error/28959/9 "2024-03-12T11:50:05Z")

</div>

You don’t change it.

The list of urls defined in a urls.py file must be named `urlpatterns` for it to be recognized by the url dispatcher.
