This commit is contained in:
Víðir Valberg Guðmundsson 2023-06-21 15:21:43 +02:00
parent b27c0f4fb7
commit e12a490497

View file

@ -211,7 +211,7 @@ This opens up a quite nifty possibility of injecting URLs into a namespace from
name="custom-view"
)
def custom_view(request: HttpRequest) -> HttpResponse:
return HttpResponse("I'm in another namespace")
return HttpResponse("I'm a view in the app_1 namespace defined in another views file.")
Now we can treat `custom_view` as if it was a part of the `app_1` namespace. Ie. `reverse("app_1:custom-view")` would give us `app_1/my-custom-view/`. Neat!