diff options
Diffstat (limited to 'app/resume/models.py')
-rw-r--r-- | app/resume/models.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/app/resume/models.py b/app/resume/models.py index 390a277..2161e88 100644 --- a/app/resume/models.py +++ b/app/resume/models.py @@ -80,7 +80,9 @@ class Resume(models.Model): title = models.CharField(max_length=200) slug = models.CharField(max_length=50, blank=True) profile = models.TextField() + profile_html = models.TextField(blank=True) skills = models.TextField() + skills_html = models.TextField(blank=True) jobs = models.ManyToManyField(Job) def __str__(self): @@ -89,4 +91,8 @@ class Resume(models.Model): def save(self, *args, **kwargs): if self._state.adding and not self.slug: self.slug = slugify(self.title) + if self.skills: + self.skills_html = markdown_to_html(self.skills) + if self.profile: + self.profile_html = markdown_to_html(self.profile) super(Resume, self).save() |