mirror of
https://github.com/django-components/django-components.git
synced 2025-08-04 14:28:18 +00:00
Add mypy support (#396), thanks @JuroOravec
This commit is contained in:
parent
4090c928ee
commit
b14dec9777
14 changed files with 104 additions and 58 deletions
|
@ -48,6 +48,10 @@ class VariableDisplay(component.Component):
|
|||
class IncrementerComponent(component.Component):
|
||||
template_name = "incrementer.html"
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
super().__init__(*args, **kwargs)
|
||||
self.call_count = 0
|
||||
|
||||
def get_context_data(self, value=0):
|
||||
value = int(value)
|
||||
if hasattr(self, "call_count"):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue