Skip to content

Commit

Permalink
TMP: fixy
Browse files Browse the repository at this point in the history
  • Loading branch information
KevinMind committed Feb 11, 2025
1 parent 19d6f59 commit 0f299b6
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
1 change: 1 addition & 0 deletions src/olympia/addons/tests/test_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -8011,6 +8011,7 @@ def test_get(self):
}


@override_settings(ENV='local')
class TestJavascriptCatalog(TestCase):
@pytest.mark.needs_locales_compilation
def test_get_correct_catalog(self):
Expand Down
8 changes: 4 additions & 4 deletions src/olympia/amo/templatetags/jinja_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,26 +210,26 @@ def format_html(string, *args, **kwargs):


@library.global_function
def js(bundle, debug=None):
def js(bundle):
"""
If we are in debug mode, just output a single script tag for each js file.
If we are not in debug mode, return a script that points at bundle-min.js.
Copied from jingo-minify until we switch to something better...
"""
urls = get_js_urls(bundle, debug)
urls = get_js_urls(bundle)
attrs = ['src="%s"']

return _build_html(urls, '<script %s></script>' % ' '.join(attrs))


@library.global_function
def css(bundle, media=False, debug=None):
def css(bundle, media=False):
"""
If we are in debug mode, just output a single script tag for each css file.
If we are not in debug mode, return a script that points at bundle-min.css.
"""
urls = get_css_urls(bundle, debug)
urls = get_css_urls(bundle)
if not media:
media = 'all'

Expand Down
4 changes: 3 additions & 1 deletion src/olympia/lib/storage.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,7 @@ class ManifestStaticFilesStorageNotMaps(ManifestStaticFilesStorage):


OlympiaStaticFilesStorage = (
ManifestStaticFilesStorageNotMaps if settings.TARGET == 'production' else StaticFilesStorage
ManifestStaticFilesStorageNotMaps
if settings.TARGET == 'production'
else StaticFilesStorage
)

0 comments on commit 0f299b6

Please sign in to comment.