2024-01-13 12:01:14 +07:00
|
|
|
import os
|
|
|
|
|
|
|
|
def add(dirconfig, template_directory):
|
2024-05-12 02:18:32 +07:00
|
|
|
template_list = [d for d in os.listdir(template_directory) if os.path.isdir(os.path.join(template_directory, d))]
|
2024-01-13 12:01:14 +07:00
|
|
|
for template_name in template_list:
|
|
|
|
template_module = __import__(f"{template_directory}.{template_name}.main", fromlist=["static"])
|
|
|
|
for static in getattr(template_module, "static", []):
|
2024-05-12 02:18:32 +07:00
|
|
|
dirconfig.append(static)
|