From 932fc0985e3e94feecb012fff4c873c917d9f5be Mon Sep 17 00:00:00 2001 From: luxagraf Date: Thu, 17 Jan 2019 10:35:34 -0600 Subject: updated resume app --- app/resume/models.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'app/resume/models.py') 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() -- cgit v1.2.3-70-g09d2