Skip to content

Commit

Permalink
enh: always perform CSS rebranding after dcor develop
Browse files Browse the repository at this point in the history
  • Loading branch information
paulmueller committed Jan 29, 2024
1 parent 553f6f9 commit fa7861b
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
0.9.6
- enh: always encrypt beaker session cookies
- enh: set up cookies more strictly
- enh: always perform CSS rebranding after `dcor develop`
- ref: migrate to dcor_shared 0.6.0
- setup: pin uwsgi==2.0.21 due to non-working harakiri
0.9.5
Expand Down
14 changes: 13 additions & 1 deletion dcor_control/cli/develop.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@
import uuid

import click
from dcor_shared.paths import get_ckan_config_path

from ..inspect import reload_supervisord
from ..inspect import config_ckan, reload_supervisord


@click.command()
Expand All @@ -26,6 +27,17 @@ def develop():
]:
migrate_to_editable(name)

# Redo the CSS branding
print("Applying DCOR CSS branding")
ckan_ini = get_ckan_config_path()
ckan_cmd = f"ckan -c {ckan_ini} dcor-theme-main-css-branding"
sp.check_output(ckan_cmd, shell=True)
# set config option
config_ckan.check_ckan_ini_option(
key="ckan.theme",
value="dcor_theme_main/dcor_theme_main",
autocorrect=True)

reload_supervisord()
click.secho('DONE', fg=u'green', bold=True)

Expand Down
1 change: 1 addition & 0 deletions dcor_control/inspect/config_ckan.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ def check_dcor_theme_main_css(autocorrect):
"""
ckan_ini = get_ckan_config_path()
opt = get_actual_ckan_option("ckan.theme")
# TODO: Check whether the paths created by this script are setup correctly
if opt != "dcor_theme_main/dcor_theme_main":
if autocorrect:
print("Applying DCOR theme main css")
Expand Down

0 comments on commit fa7861b

Please sign in to comment.