fix(context): change context template in the template file and rename context dict keys with default values.

This commit is contained in:
Hanif Birgani 2023-10-07 03:30:19 +03:30 committed by Emil Stenström
parent ba436c0080
commit 4753698765

View file

@ -126,6 +126,8 @@ class Command(BaseCommand):
f"""
<div class="component-{name}">
Hello from {name} component!
<br>
This is {{ param }} context value.
</div>
"""
)
@ -142,9 +144,9 @@ class Command(BaseCommand):
class {name.capitalize()}(component.Component):
template_name = "{name}/{template_filename}"
def get_context_data(self, date):
def get_context_data(self, value):
return {{
"date": date,
"param": "sample value",
}}
class Media: