wip
This commit is contained in:
parent
b27c0f4fb7
commit
e12a490497
|
@ -211,7 +211,7 @@ This opens up a quite nifty possibility of injecting URLs into a namespace from
|
||||||
name="custom-view"
|
name="custom-view"
|
||||||
)
|
)
|
||||||
def custom_view(request: HttpRequest) -> HttpResponse:
|
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!
|
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!
|
||||||
|
|
Loading…
Reference in a new issue