damned-lies r1295 - in trunk: . vertimus
- From: claudep svn gnome org
- To: svn-commits-list gnome org
- Subject: damned-lies r1295 - in trunk: . vertimus
- Date: Sat, 3 Jan 2009 15:32:59 +0000 (UTC)
Author: claudep
Date: Sat Jan 3 15:32:59 2009
New Revision: 1295
URL: http://svn.gnome.org/viewvc/damned-lies?rev=1295&view=rev
Log:
2009-01-03 Claude Paroz <claude 2xlibre net>
* vertimus/models.py: Set correct filename for the file to backup.
Modified:
trunk/ChangeLog
trunk/vertimus/models.py
Modified: trunk/vertimus/models.py
==============================================================================
--- trunk/vertimus/models.py (original)
+++ trunk/vertimus/models.py Sat Jan 3 15:32:59 2009
@@ -524,7 +524,7 @@
return new_state
def generate_backup_file_name(instance, original_filename):
- return "%s/%s" % (settings.UPLOAD_BACKUP_DIR, original_filename)
+ return "%s/%s" % (settings.UPLOAD_BACKUP_DIR, os.path.basename(original_filename))
class ActionDbBackup(models.Model):
state_db = models.ForeignKey(StateDb)
@@ -564,7 +564,7 @@
comment=action_db.comment,
file=file_to_backup)
if file_to_backup:
- action_db_backup.file.save(self.get_filename(), file_to_backup, save=False)
+ action_db_backup.file.save(action_db.file.name, file_to_backup, save=False)
action_db_backup.save()
if sequence == None:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]