diff options
Diffstat (limited to 'tbc')
-rw-r--r-- | tbc/models.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tbc/models.py b/tbc/models.py index f334579..e663ec0 100644 --- a/tbc/models.py +++ b/tbc/models.py @@ -39,11 +39,11 @@ ABOUT_PROJ = (("pythontbc website", "Python TBC Website"), ("others", "Others")) def get_notebook_dir(instance, filename): - return '%s/%s/%s' % (instance.book.contributor, instance.book.title, filename) + return '%s/%s/%s' % (instance.book.contributor, instance.book.title.replace(' ', '_'), filename) def get_image_dir(instance, filename): - return '%s/%s/screenshots/%s' % (instance.book.contributor, instance.book.title, filename) + return '%s/%s/screenshots/%s' % (instance.book.contributor, instance.book.title.replace(' ', '_'), filename) class Profile(models.Model): |