feat: ruff'ed
This commit is contained in:
@@ -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')
|
||||
|
||||
Reference in New Issue
Block a user