2024-01-24 23:15:02 +13:00
|
|
|
from pathlib import Path
|
|
|
|
|
2024-01-24 21:07:07 +13:00
|
|
|
from django.conf import settings
|
|
|
|
|
|
|
|
def register_plugin_settings(settings=settings, name='defaults'):
|
2024-01-24 23:15:02 +13:00
|
|
|
|
2024-01-24 21:07:07 +13:00
|
|
|
settings.STATICFILES_DIRS += [
|
2024-01-24 23:15:02 +13:00
|
|
|
str(Path(settings.PACKAGE_DIR) / f'plugins/{name}/static'),
|
2024-01-24 21:07:07 +13:00
|
|
|
]
|
|
|
|
|
|
|
|
settings.TEMPLATE_DIRS += [
|
2024-01-24 23:15:02 +13:00
|
|
|
str(Path(settings.PACKAGE_DIR) / f'plugins/{name}/templates'),
|
2024-01-24 21:07:07 +13:00
|
|
|
]
|
|
|
|
|
|
|
|
print('REGISTERED PLUGIN SETTINGS', name)
|