Recompose the document filename using os.extsep.join

This commit is contained in:
Roberto Rosario
2011-05-30 22:45:56 -04:00
parent 14a6c9d3f0
commit 39da4d2e6b

View File

@@ -76,7 +76,7 @@ class Document(models.Model):
ordering = ['-date_added']
def __unicode__(self):
return '%s.%s' % (self.file_filename, self.file_extension)
return os.extsep.join([self.file_filename, self.file_extension])
def save(self, *args, **kwargs):
new_document = not self.pk