feat: ruff'ed

This commit is contained in:
2025-05-02 08:38:57 +02:00
parent 32b36b81b3
commit 48b53d851a
62 changed files with 2019 additions and 3655 deletions
@@ -26,7 +26,7 @@ class Command(BaseCommand):
def handle(self, *args, **options):
web_settings = WebSettings.load()
path = os.path.join(settings.BASE_DIR, "web", "static", "css", "main.css")
path = os.path.join(settings.BASE_DIR, 'web', 'static', 'css', 'main.css')
colors = []
for color_name, data in web_settings.theme_colors.items():
@@ -34,23 +34,9 @@ class Command(BaseCommand):
color = Color(color_name, index, value)
colors.append(color)
result = str(
render_to_string(
"theme/main.css.template",
context={"colors": colors},
)
)
with open(path, "w") as f:
result = str(render_to_string('theme/main.css.template', context={'colors': colors}))
with open(path, 'w') as f:
f.write(result)
subprocess.run(
[
"tailwindcss",
"-i",
"web/static/css/main.css",
"-o",
"web/static/css/styles.css",
"--minify",
]
)
call_command("collectstatic", "--no-input")
subprocess.run(['tailwindcss', '-i', 'web/static/css/main.css', '-o', 'web/static/css/styles.css', '--minify'])
call_command('collectstatic', '--no-input')