mirror of
https://github.com/django-components/django-components.git
synced 2025-08-08 08:17:59 +00:00

Move required slot check to SlotNode.render(); clean up needed Remove unused code; drop caching Update docs Incorporate PR feedback
21 lines
489 B
Python
21 lines
489 B
Python
from django.conf import settings
|
|
|
|
|
|
class AppSettings:
|
|
def __init__(self):
|
|
self.settings = getattr(settings, "COMPONENTS", {})
|
|
|
|
@property
|
|
def AUTODISCOVER(self):
|
|
return self.settings.setdefault("autodiscover", True)
|
|
|
|
@property
|
|
def LIBRARIES(self):
|
|
return self.settings.setdefault("libraries", [])
|
|
|
|
@property
|
|
def TEMPLATE_CACHE_SIZE(self):
|
|
return self.settings.setdefault("template_cache_size", 128)
|
|
|
|
|
|
app_settings = AppSettings()
|