Commits

Benjamin Klüglein committed 4720957

Added upload dir variable

  • Participants
  • Parent commits 18c2167
  • Branches upload_ticket

Comments (0)

Files changed (1)

File upload/models.py

 
 import time
 
+UPLOAD_DIR = "uploaded_files"
+
 class File(models.Model):
     owner = models.ForeignKey(User)
     name = models.CharField(max_length=128, blank=False, null=False)
     description = models.TextField(max_length=512)
     created_at = models.DateTimeField("Created at", auto_now=True)
-    file_on_fs = models.FileField(upload_to="uploads")
+    file_on_fs = models.FileField(upload_to=UPLOAD_DIR)
     download_password = models.CharField(max_length=64, blank=True)
 
     def is_password_protected(self):