duck.backend.django.viewsΒΆ
Module containing the default view to handle all Django requests through redirecting them to the appropriate Duck view to produce a response.
Module ContentsΒΆ
FunctionsΒΆ
Django default view to handle requests meant for urlpatterns registered within Duck. |
|
Django default view to handle requests meant for urlpatterns registered within Duck. |
|
Decorator to ensure that the Django request.META gets updated with the Duck request.META before processing the function. |
APIΒΆ
- duck.backend.django.views._duck_django_view(request: django.http.request.HttpRequest) django.http.response.HttpResponseΒΆ
Django default view to handle requests meant for urlpatterns registered within Duck.
- Parameters:
request β The Django HTTP request.
- Returns:
The corresponding Django HTTP response.
- Return type:
DjangoHttpResponse
- duck.backend.django.views.duck_django_view(request: django.http.request.HttpRequest) django.http.response.HttpResponseΒΆ
Django default view to handle requests meant for urlpatterns registered within Duck.
- Parameters:
request β The Django HTTP request.
- Returns:
The corresponding Django HTTP response.
- Return type:
DjangoHttpResponse
- duck.backend.django.views.request_meta_update(func: Callable)ΒΆ
Decorator to ensure that the Django request.META gets updated with the Duck request.META before processing the function.
Why Do This:
Keeps the Django request.META in sync with the Duck request.META.
Ensures consistency in metadata between the two request objects.
- Parameters:
func β The function to be wrapped.
- Returns:
The wrapped function with synchronized request.META.
- Return type:
Callable