replace :/ in filename

This commit is contained in:
j 2009-08-28 11:46:43 +02:00
parent cefcc94b84
commit b1ce39b51b

View file

@ -67,6 +67,7 @@ class Text(models.Model):
elif author.endswith("."): elif author.endswith("."):
author = author[:-1] + "_" author = author[:-1] + "_"
title = self.title title = self.title
title = re.sub('[:/]', '_', title)
if self.version: if self.version:
title += ".%s" % self.version title += ".%s" % self.version
extension = os.path.splitext(self.file.path)[1].lower() extension = os.path.splitext(self.file.path)[1].lower()