diff options
| -rw-r--r-- | chimere/models.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/chimere/models.py b/chimere/models.py index e4469b4..827c56e 100644 --- a/chimere/models.py +++ b/chimere/models.py @@ -573,6 +573,8 @@ def picturefile_post_save(sender, **kwargs): # defining the filename and the thumbnail filename filehead, filetail = os.path.split(os.path.abspath(file.path)) basename, format = os.path.splitext(filetail) + basename = defaultfilters.slugify(basename) + basename = re.sub(r'-','_', basename) miniature = basename + '_thumb' + format filename = file.path miniature_filename = os.path.join(filehead, miniature) |
