mirror of
https://github.com/django-components/django-components.git
synced 2025-08-31 11:17:21 +00:00
docs: fix links in getting started section + few other (#1026)
This commit is contained in:
parent
12a64f8e41
commit
8e7acd82be
9 changed files with 83 additions and 70 deletions
|
@ -119,15 +119,15 @@ If you want to use a different Response class in `render_to_response`, set the `
|
|||
|
||||
```py
|
||||
class MyResponse(HttpResponse):
|
||||
def __init__(self, *args, **kwargs) -> None:
|
||||
super().__init__(*args, **kwargs)
|
||||
# Configure response
|
||||
self.headers = ...
|
||||
self.status = ...
|
||||
def __init__(self, *args, **kwargs) -> None:
|
||||
super().__init__(*args, **kwargs)
|
||||
# Configure response
|
||||
self.headers = ...
|
||||
self.status = ...
|
||||
|
||||
class SimpleComponent(Component):
|
||||
response_class = MyResponse
|
||||
template: types.django_html = "HELLO"
|
||||
response_class = MyResponse
|
||||
template: types.django_html = "HELLO"
|
||||
|
||||
response = SimpleComponent.render_to_response()
|
||||
assert isinstance(response, MyResponse)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue