summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorluxagraf <sng@luxagraf.net>2019-03-25 12:52:19 -0600
committerluxagraf <sng@luxagraf.net>2019-03-25 12:52:19 -0600
commit66b761a9d567c88864ceb33a644a3ea8070d16d8 (patch)
treefa763d43dc5bb4a08e3f625aa40a77976d7cd271 /app
parentf4551d4630b55aca5149c54c81f4d7d974457cba (diff)
added audio insert to admin image inserter
Diffstat (limited to 'app')
-rw-r--r--app/recordings/models.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/app/recordings/models.py b/app/recordings/models.py
index dda4713..8da5c36 100644
--- a/app/recordings/models.py
+++ b/app/recordings/models.py
@@ -10,7 +10,7 @@ from locations.models import Location, CheckIn
def get_upload_path(self, filename):
- return "media/audio/%s/%s" % (datetime.datetime.today().strftime("%Y"), filename)
+ return "audio/%s/%s" % (datetime.datetime.today().strftime("%Y"), filename)
class Audio(models.Model):
@@ -56,6 +56,9 @@ class Audio(models.Model):
except model.DoesNotExist:
return ''
+ def get_type(self):
+ return str(self.__class__.__name__)
+
def save(self, *args, **kwargs):
md = render_images(self.body_markdown)
self.body_html = markdown_to_html(md)