This commit is contained in:
Víðir Valberg Guðmundsson 2023-06-21 15:21:43 +02:00
parent b27c0f4fb7
commit e12a490497
1 changed files with 1 additions and 1 deletions

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!