Django ignores urlpatterns

I have created a very basic urlpattern but it is ignored.

def hallo(request): return JsonResponse("Hallo", safe=False)

urlpatterns = [
    # path('admin/', admin.site.urls),
    # path('admin/', JsonResponse("Hallo", safe=False) ),
    path("", hallo),
    path("hallo/", hallo) 
]

It will always be shown the "standard" page instead of "hallo", and even the admin page. And the page hallo cannot be found.

I stopped the server and run it with different ports but there is always the same behaviour.

Вернуться на верх