Skip to content

Commit

Permalink
Merge pull request #34 from joseguerrero/master
Browse files Browse the repository at this point in the history
- Setting the maximum length of the filename by putting a new variable i...
  • Loading branch information
Peter Bengtsson committed Nov 5, 2015
2 parents cf4d4ed + 5b4c681 commit 2a50f71
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion django_static/templatetags/django_static.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
settings.DJANGO_STATIC = getattr(settings, 'DJANGO_STATIC', False)
settings.DJANGO_STATIC_SAVE_PREFIX = getattr(settings, 'DJANGO_STATIC_SAVE_PREFIX', '')
settings.DJANGO_STATIC_NAME_PREFIX = getattr(settings, 'DJANGO_STATIC_NAME_PREFIX', '')
settings.DJANGO_STATIC_NAME_MAX_LENGTH = getattr(settings, 'DJANGO_STATIC_NAME_MAX_LENGTH', 40)
settings.DJANGO_STATIC_MEDIA_URL = \
getattr(settings, "DJANGO_STATIC_MEDIA_URL", None)
settings.DJANGO_STATIC_MEDIA_URL_ALWAYS = \
Expand Down Expand Up @@ -450,7 +451,7 @@ def wrap_up(filename):
new_file_content.write(open(filepath, 'r').read().strip())
new_file_content.write('\n')

filename = _combine_filenames(filename)
filename = _combine_filenames(filename, settings.DJANGO_STATIC_NAME_MAX_LENGTH)
# Set the root path of the combined files to the first entry
# in the MEDIA_ROOTS list. This way django-static behaves a
# little more predictible.
Expand Down

0 comments on commit 2a50f71

Please sign in to comment.