Skip to content

Commit

Permalink
Collect jsi18n files via staticfiles to get hashed filenames.
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Kelly committed Feb 24, 2016
1 parent 1bf0fbf commit 19c96f1
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
2 changes: 2 additions & 0 deletions jsi18n/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*
!.gitignore
4 changes: 4 additions & 0 deletions kitsune/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -362,6 +362,7 @@
STATIC_URL = '/static/'
STATICFILES_DIRS = (
path('bower_components'),
path('jsi18n'), # Collect jsi18n so that it is cache-busted
)
STATICFILES_FINDERS = (
'django.contrib.staticfiles.finders.FileSystemFinder',
Expand Down Expand Up @@ -641,6 +642,9 @@ def JINJA_CONFIG():

STATICI18N_DOMAIN = 'djangojs'
STATICI18N_PACKAGES = ['kitsune.sumo']
# Save jsi18n files outside of static so that collectstatic will pick
# them up and save it with hashed filenames in the static directory.
STATICI18N_ROOT = path('jsi18n')

#
# Django Pipline
Expand Down
2 changes: 1 addition & 1 deletion scripts/update/deploy.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,8 @@ def pre_update(ctx, ref=settings.UPDATE_REF):

@task
def update(ctx):
update_assets()
update_locales()
update_assets()
db_migrations()


Expand Down

0 comments on commit 19c96f1

Please sign in to comment.