# Django doesn't go through my urls

**URL:** <https://forum.djangoproject.com/t/django-doesnt-go-through-my-urls/17433>\
**Category:** Mystery Errors\
**Created:** [December 4, 2022, 1:56pm UTC](https://forum.djangoproject.com/t/django-doesnt-go-through-my-urls/17433 "2022-12-04T13:56:37Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![VincentAbensour](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/vincentabensour/32/11176_2.png) [@VincentAbensour](https://forum.djangoproject.com/u/VincentAbensour)\
**Post date:** [December 4, 2022, 1:56pm UTC](https://forum.djangoproject.com/t/django-doesnt-go-through-my-urls/17433/1 "2022-12-04T13:56:37Z")

</div>

I’m new to Django and I’m facing a problem that I can’t solve despit my research… I’v already made small django projects without this error but since I reformat my computer (I can’t see the link but that’s context!) i’m having this problem.

So when I’m running (runserver) a django project this is what my browser shows me despite others urls in my project

 ![2900p](https://us1.discourse-cdn.com/flex026/uploads/djangoproject/original/2X/f/f60ef7f5a1bd1febae0d5ff56486ed31150ee09a.png)

I’v tried with an almost empty project but a least one more url and still have the same page.

urls.py in the main file (src/mynotes/urls.py):

> from django.contrib import admin  
> from django.urls import path, include
> 
> urlpatterns = [  
> path(‘index/’, include(‘dbnotes.urls’)),  
> path(‘admin/’, admin.site.urls),  
> ]

settings.py in the main project (src/mynotes/settings.py):

> INSTALLED\_APPS = [  
> ‘django.contrib.admin’,  
> ‘django.contrib.auth’,  
> ‘django.contrib.contenttypes’,  
> ‘django.contrib.sessions’,  
> ‘django.contrib.messages’,  
> ‘django.contrib.staticfiles’,  
> ‘dbnotes’  
> ]

urls.py in the app (src/dbnotes/urls.py):

> from django.urls import path  
> from . import views
> 
> urlpatterns = [  
> path(“”, views.homepage, name=“homepage”),  
> ]

views.py in the app (src/dbnotes/views.py):

> from django.http import HttpResponse
> 
> def homepage(request):  
> return HttpResponse(“Hello, world. You’re at the polls index.”)

Even stranger, when i change “path(‘admin/’, admin.site.urls)” I still get the admin page with the same route. Even if i change ‘admin/’ or admin.site.urls.

It looks like my local server display an over empty django project but in the error page it’s written “mynotes.urls” as the url location which is the good folder.

I’m working with a virtual environment.

I’m lost as it’s the first time i got this issue despite having created ohter (small) django projects!

If anyone has an idea that would be great! Thank you!

I found a topic related to my problem but without an anwer : [Django doesn’t see urls.py](https://stackoverflow.com/questions/67424421/django-doesnt-see-urls-py)

---

<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:** [December 4, 2022, 4:06pm UTC](https://forum.djangoproject.com/t/django-doesnt-go-through-my-urls/17433/2 "2022-12-04T16:06:48Z")

</div>

Given the symptoms you’re describing here, my first reaction is that you’re not running what you think you’re running.

It could be anything at this point - including an old version of runserver that is still running.

---

<div class="post-metadata">

**Author:** ![massover](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/massover/32/1792_2.png) [@massover](https://forum.djangoproject.com/u/massover)\
**Post date:** [December 4, 2022, 7:16pm UTC](https://forum.djangoproject.com/t/django-doesnt-go-through-my-urls/17433/3 "2022-12-04T19:16:43Z")

</div>

Are you forgetting a trailing slash? In the image, you are making a request to /index. In the code, your path is defined /index/

---

<div class="post-metadata">

**Author:** ![VincentAbensour](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/vincentabensour/32/11176_2.png) [@VincentAbensour](https://forum.djangoproject.com/u/VincentAbensour)\
**Post date:** [December 5, 2022, 8:59am UTC](https://forum.djangoproject.com/t/django-doesnt-go-through-my-urls/17433/4 "2022-12-05T08:59:51Z")

</div>

Hi and thank you for your answer. Yes I agree, even more with the fact that when I simply delete “admin.site.urls” in the main urls.py the admin page still load as if I didn’t change anything.

But when I execute python “manage.py runserver” it’s written “Starting development server at [http://127.0.0.1:8000/](http://127.0.0.1:8000/)” as it should, so I really can’t be wrong on the url of the local host as I just click on it.

Do you know how I can check if an old version of runserver that is still running?

---

<div class="post-metadata">

**Author:** ![VincentAbensour](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/vincentabensour/32/11176_2.png) [@VincentAbensour](https://forum.djangoproject.com/u/VincentAbensour)\
**Post date:** [December 5, 2022, 9:00am UTC](https://forum.djangoproject.com/t/django-doesnt-go-through-my-urls/17433/5 "2022-12-05T09:00:34Z")

</div>

Hi, I tried to change it but it didn’t change the result.

---

<div class="post-metadata">

**Author:** ![VincentAbensour](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/vincentabensour/32/11176_2.png) [@VincentAbensour](https://forum.djangoproject.com/u/VincentAbensour)\
**Post date:** [December 5, 2022, 9:03am UTC](https://forum.djangoproject.com/t/django-doesnt-go-through-my-urls/17433/6 "2022-12-05T09:03:19Z")

</div>

I just tried to change the port with “python manage.py runserver 8080” but it didn’t change anything.

---

<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:** [December 5, 2022, 12:08pm UTC](https://forum.djangoproject.com/t/django-doesnt-go-through-my-urls/17433/7 "2022-12-05T12:08:07Z")

</div>

What operating system are you using? How you check to see what processes are running depends upon that. (e.g. Task Manager in Windows, the `ps` command in \*nix-style systems, etc.)

---

<div class="post-metadata">

**Author:** ![VincentAbensour](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/vincentabensour/32/11176_2.png) [@VincentAbensour](https://forum.djangoproject.com/u/VincentAbensour)\
**Post date:** [December 5, 2022, 1:13pm UTC](https://forum.djangoproject.com/t/django-doesnt-go-through-my-urls/17433/8 "2022-12-05T13:13:22Z")

</div>

I’m on windows 11 if that’s the question

---

<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:** [December 5, 2022, 1:28pm UTC](https://forum.djangoproject.com/t/django-doesnt-go-through-my-urls/17433/9 "2022-12-05T13:28:59Z")

</div>

Yes, so Task Manager is the easiest tool to use to see what processes are running.

---

<div class="post-metadata">

**Author:** ![VincentAbensour](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/vincentabensour/32/11176_2.png) [@VincentAbensour](https://forum.djangoproject.com/u/VincentAbensour)\
**Post date:** [December 5, 2022, 2:15pm UTC](https://forum.djangoproject.com/t/django-doesnt-go-through-my-urls/17433/10 "2022-12-05T14:15:10Z")

</div>

So… I think I found the solution and it’s actually really disappointing. For some reason VSCode wasn’t editing anymore my files. I was modifying the project in VS but the actual files were not changing. I don’t know what to say ^^. Anyway thank you very much for your time

**The topic can be closed**

---

<div class="post-metadata">

**Author:** ![EleazarColeShowers](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/eleazarcoleshowers/32/16308_2.png) [@EleazarColeShowers](https://forum.djangoproject.com/u/EleazarColeShowers)\
**Post date:** [October 6, 2023, 7:57pm UTC](https://forum.djangoproject.com/t/django-doesnt-go-through-my-urls/17433/11 "2023-10-06T19:57:32Z")

</div>

Hi, How did you then edit your files without VScode, did you use another IDE?

---

<div class="post-metadata">

**Author:** ![gasper1](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/gasper1/32/22072_2.png) [@gasper1](https://forum.djangoproject.com/u/gasper1)\
**Post date:** [June 20, 2024, 9:27am UTC](https://forum.djangoproject.com/t/django-doesnt-go-through-my-urls/17433/12 "2024-06-20T09:27:08Z")

</div>

Man I was going crazy… This is so stupid. Thanks for the hint!

---

<div class="post-metadata">

**Author:** ![abhayvr](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/abhayvr/32/24355_2.png) [@abhayvr](https://forum.djangoproject.com/u/abhayvr)\
**Post date:** [October 4, 2024, 5:34am UTC](https://forum.djangoproject.com/t/django-doesnt-go-through-my-urls/17433/13 "2024-10-04T05:34:02Z")

</div>

please could you explain what to do iam facing the same problem i dont know how to solve it everytime i try different urs it keeps showing me the same django welcome page

---

<div class="post-metadata">

**Author:** ![TauseefDev](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/tauseefdev/32/25657_2.png) [@TauseefDev](https://forum.djangoproject.com/u/TauseefDev)\
**Post date:** [December 7, 2024, 9:16am UTC](https://forum.djangoproject.com/t/django-doesnt-go-through-my-urls/17433/14 "2024-12-07T09:16:42Z")

</div>

I was facing the same problem and after reading this thread I realized that autosave was off in my IDE in my case which was VS code so try changing your autosave setting in your IDE then it will work.

---

<div class="post-metadata">

**Author:** ![D-haech](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/d-haech/32/27918_2.png) [@D-haech](https://forum.djangoproject.com/u/D-haech)\
**Post date:** [April 3, 2025, 1:22am UTC](https://forum.djangoproject.com/t/django-doesnt-go-through-my-urls/17433/15 "2025-04-03T01:22:18Z")

</div>

This was also my issue. The autosave was not set in VSCode
