summaryrefslogtreecommitdiff
path: root/yaksh
diff options
context:
space:
mode:
Diffstat (limited to 'yaksh')
-rw-r--r--yaksh/models.py10
1 files changed, 2 insertions, 8 deletions
diff --git a/yaksh/models.py b/yaksh/models.py
index 20d8716..18565c2 100644
--- a/yaksh/models.py
+++ b/yaksh/models.py
@@ -288,13 +288,7 @@ class QuestionsFileUpload(models.Model):
question = models.ForeignKey(Question, related_name="question")
extract = models.BooleanField(default=False)
- def delete_all_files(self, files):
- for file in files:
- if os.path.exists(file.files.path):
- shutil.rmtree(os.path.dirname(file.files.path))
- file.delete()
-
- def delete_selected_files(self, files):
+ def delete_files(self, files):
for file in files:
if os.path.exists(file.files.path):
os.remove(file.files.path)
@@ -302,7 +296,7 @@ class QuestionsFileUpload(models.Model):
os.rmdir(os.path.dirname(file.files.path))
file.delete()
- def extract_files(self, files):
+ def set_extract_status(self, files):
for file in files:
if file.extract:
file.extract = False