mirror of
https://github.com/django-components/django-components.git
synced 2025-08-31 03:07:19 +00:00
Renamed get_context
to get_context_data
This commit is contained in:
parent
b322ab0294
commit
5fcabaa5ba
7 changed files with 22 additions and 22 deletions
|
@ -16,7 +16,7 @@ class SlottedComponent(component.Component):
|
|||
class SimpleComponent(component.Component):
|
||||
template_name = "simple_template.html"
|
||||
|
||||
def get_context(self, variable, variable2="default"):
|
||||
def get_context_data(self, variable, variable2="default"):
|
||||
return {
|
||||
"variable": variable,
|
||||
"variable2": variable2,
|
||||
|
@ -41,7 +41,7 @@ class BreadcrumbComponent(component.Component):
|
|||
'Document and website structure')
|
||||
]
|
||||
|
||||
def get_context(self, items):
|
||||
def get_context_data(self, items):
|
||||
if items > 4:
|
||||
items = 4
|
||||
elif items < 0:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue