summaryrefslogtreecommitdiff
path: root/app/jrnl/models.py
diff options
context:
space:
mode:
authorluxagraf <sng@luxagraf.net>2016-03-09 10:46:39 -0500
committerluxagraf <sng@luxagraf.net>2016-03-09 10:46:39 -0500
commit86bb919d5e87b33f93c2d09c6fe36eb2f393b7e6 (patch)
treeb6d91242b8b0159ff82d97a292b46d6db94d6b0c /app/jrnl/models.py
parentd8dc66e53ab94add45e61d38940a2c27baf34194 (diff)
Hid title field on change form since I can pick it up from the entry
title
Diffstat (limited to 'app/jrnl/models.py')
-rw-r--r--app/jrnl/models.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/app/jrnl/models.py b/app/jrnl/models.py
index d2e9248..834b643 100644
--- a/app/jrnl/models.py
+++ b/app/jrnl/models.py
@@ -170,7 +170,7 @@ class Entry(models.Model):
class EntryTitleSong(models.Model):
- title = models.CharField(max_length=200)
+ title = models.CharField(max_length=200, blank=True)
band = models.CharField(max_length=200)
album = models.CharField(max_length=200, blank=True, null=True)
song = models.CharField(max_length=200, blank=True, null=True)
@@ -193,6 +193,7 @@ class EntryTitleSong(models.Model):
if not self.id and not self.pub_date:
self.pub_date = datetime.datetime.now()
self.slug = slugify(self.title)
+ self.title = self.entry.title
super(EntryTitleSong, self).save()