diff options
author | CruiseDevice | 2019-02-12 16:56:59 +0530 |
---|---|---|
committer | CruiseDevice | 2019-02-18 11:40:37 +0530 |
commit | 31336af1487201b05681c039c839a9213143fcf2 (patch) | |
tree | 4dbbf411d2972992b0a1ac2888a32df63adf2148 /yaksh/models.py | |
parent | 51fc3bfee398da2781228a3b3bf32cb5ef3abc6b (diff) | |
download | online_test-31336af1487201b05681c039c839a9213143fcf2.tar.gz online_test-31336af1487201b05681c039c839a9213143fcf2.tar.bz2 online_test-31336af1487201b05681c039c839a9213143fcf2.zip |
Fix download file for a question in quiz
Diffstat (limited to 'yaksh/models.py')
-rw-r--r-- | yaksh/models.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/yaksh/models.py b/yaksh/models.py index cce90e7..7b80306 100644 --- a/yaksh/models.py +++ b/yaksh/models.py @@ -1408,6 +1408,9 @@ class FileUpload(models.Model): self.hide = True self.save() + def get_filename(self): + return os.path.basename(self.file.name) + ############################################################################### class Answer(models.Model): |