add absolute url (also for 'view on site' in admin app)

This commit is contained in:
2021-05-13 17:32:25 +00:00
parent 66dc28da88
commit f56d304b3c
3 changed files with 22 additions and 3 deletions

View File

@@ -1,6 +1,7 @@
from django.conf import settings
from django.core.validators import ValidationError
from django.db import models
from django.urls import reverse
from django.utils import timezone
from django.utils.translation import gettext_lazy as _
@@ -39,6 +40,9 @@ class JobPosting(models.Model):
def __str__(self):
return str(self.publishDate) + "_" + self.companyName + "_" + self.jobName
def get_absolute_url(self):
return reverse("blackboard")
def pdf2jpeg(self, pdf_input_path, jpeg_output_path):
args = [
"pef2jpeg", # actual value doesn't matter