Skip to content

Commit

Permalink
Add staging theme to esbuild entry points
Browse files Browse the repository at this point in the history
  • Loading branch information
brage-andreas committed Sep 25, 2024
1 parent ca5a45d commit d25d4c8
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 6 deletions.
1 change: 1 addition & 0 deletions esbuild.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ let entryPoints = [
{ out: 'dashboardHobbies', in: 'assets/dashboard/hobbies/index.jsx' },
{ out: 'dashboardPosters', in: 'assets/dashboard/posters/index.js' },
{ out: 'dashboardWebshop', in: 'assets/dashboard/webshop/index.js' },
{ out: 'stagingTheme', in: 'assets/core/less/staging_theme.less' },
{ out: 'eventsMail', in: 'assets/events/mail/index.js' },
{ out: 'feedback', in: 'assets/feedback/index.js' },
{ out: 'frontpage', in: 'assets/frontpage/index.jsx' },
Expand Down
6 changes: 2 additions & 4 deletions onlineweb4/context_processors.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,8 @@

def context_settings(request):
context_extras = {}
if hasattr(settings, "GOOGLE_ANALYTICS_KEY"):
context_extras["GOOGLE_ANALYTICS_KEY"] = settings.GOOGLE_ANALYTICS_KEY
if hasattr(settings, "HOT_RELOAD"):
context_extras["HOT_RELOAD"] = settings.HOT_RELOAD
if hasattr(settings, "ENVIRONMENT"):
context_extras["ENVIRONMENT"] = settings.ENVIRONMENT
return context_extras


Expand Down
2 changes: 2 additions & 0 deletions onlineweb4/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
# Root directory. Contains manage.py
PROJECT_ROOT_DIRECTORY = PROJECT_SETTINGS_DIRECTORY.parent.parent

ENVIROMENT = config("ENVIRONMENT", default="development")

sys.dont_write_bytecode = config(
"OW4_PYTHON_DONT_WRITE_BYTECODE", cast=bool, default=True
)
Expand Down
7 changes: 5 additions & 2 deletions templates/auth/dashboard/groups_detail.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,11 @@
{% block title %}Grupper - {{ group }}{% endblock %}

{% block styles %}
{{ block.super }}
{{ block.super }}
{% render_bundle 'dashboardGroups' 'css' %}
{% if ENVIRONMENT == 'dev' %}
{% render_bundle 'staging_theme' 'css' %}
{% endif %}
{% endblock %}

{% block js %}
Expand All @@ -20,7 +23,7 @@

{% block breadcrumbs %}
<li><a href="/dashboard/auth/groups/">Grupper</a></li>
<li>{{ group }}</li>
<li>{{ group }}</li>
{% endblock %}

{% block content %}
Expand Down

0 comments on commit d25d4c8

Please sign in to comment.