Django doesn't go through my urls

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

I’v tried with an almost empty project but a least one more url and still have the same page. in the main file (src/mynotes/

from django.contrib import admin
from django.urls import path, include

urlpatterns = [
path(‘index/’, include(‘dbnotes.urls’)),
] in the main project (src/mynotes/

] in the app (src/dbnotes/

from django.urls import path
from . import views

urlpatterns = [
path(“”, views.homepage, name=“homepage”),
] in the app (src/dbnotes/

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/’,” I still get the admin page with the same route. Even if i change ‘admin/’ or

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

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.

1 Like

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

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

But when I execute python “ runserver” it’s written “Starting development server at” 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?

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

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

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.)

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

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

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

1 Like