diff options
author | adityacp | 2016-07-11 16:39:54 +0530 |
---|---|---|
committer | adityacp | 2016-07-28 15:56:06 +0530 |
commit | d5c7cfbf8b7f81f2cfde404602bf4e5026583bd9 (patch) | |
tree | b39fb4a8956a4c92d2debe55726da72efb4fb0f8 /yaksh/models.py | |
parent | df9a893b91b4adb39f01b88f6b6d96359db37f47 (diff) | |
download | online_test-d5c7cfbf8b7f81f2cfde404602bf4e5026583bd9.tar.gz online_test-d5c7cfbf8b7f81f2cfde404602bf4e5026583bd9.tar.bz2 online_test-d5c7cfbf8b7f81f2cfde404602bf4e5026583bd9.zip |
removed delete function from models.py
Diffstat (limited to 'yaksh/models.py')
-rw-r--r-- | yaksh/models.py | 10 |
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 |