summaryrefslogtreecommitdiff
path: root/yaksh/models.py
diff options
context:
space:
mode:
Diffstat (limited to 'yaksh/models.py')
-rw-r--r--yaksh/models.py14
1 files changed, 0 insertions, 14 deletions
diff --git a/yaksh/models.py b/yaksh/models.py
index 7686aa0..fd48318 100644
--- a/yaksh/models.py
+++ b/yaksh/models.py
@@ -391,13 +391,6 @@ class LessonFile(models.Model):
on_delete=models.CASCADE)
file = models.FileField(upload_to=get_file_dir, default=None)
- def remove(self):
- if os.path.exists(self.file.path):
- os.remove(self.file.path)
- if os.listdir(os.path.dirname(self.file.path)) == []:
- os.rmdir(os.path.dirname(self.file.path))
- self.delete()
-
pre_delete.connect(file_cleanup, sender=LessonFile)
###############################################################################
@@ -1695,13 +1688,6 @@ class FileUpload(models.Model):
extract = models.BooleanField(default=False)
hide = models.BooleanField(default=False)
- def remove(self):
- if os.path.exists(self.file.path):
- os.remove(self.file.path)
- if os.listdir(os.path.dirname(self.file.path)) == []:
- os.rmdir(os.path.dirname(self.file.path))
- self.delete()
-
def set_extract_status(self):
if self.extract:
self.extract = False