mirror of
https://github.com/django-components/django-components.git
synced 2025-07-16 04:54:59 +00:00
parent
997ed52bb6
commit
dc9f1b46b2
10 changed files with 106 additions and 9 deletions
|
@ -1,4 +1,5 @@
|
|||
import difflib
|
||||
import inspect
|
||||
from collections import ChainMap
|
||||
from typing import Any, ClassVar, Dict, Iterable, Optional, Set, Tuple, Union
|
||||
|
||||
|
@ -87,10 +88,8 @@ class Component(View, metaclass=SimplifiedInterfaceMediaDefiningClass):
|
|||
self.outer_context: Context = outer_context or Context()
|
||||
self.fill_content = fill_content
|
||||
|
||||
@classmethod
|
||||
@property
|
||||
def class_hash(cls):
|
||||
return hash(str(cls.__module__) + str(cls.__name__))
|
||||
def __init_subclass__(cls, **kwargs):
|
||||
cls.class_hash = hash(inspect.getfile(cls) + cls.__name__)
|
||||
|
||||
def get_context_data(self, *args, **kwargs) -> Dict[str, Any]:
|
||||
return {}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue