diff options
Diffstat (limited to 'app/jrnl/models.py')
-rw-r--r-- | app/jrnl/models.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/app/jrnl/models.py b/app/jrnl/models.py index 5b7457a..6f6da1d 100644 --- a/app/jrnl/models.py +++ b/app/jrnl/models.py @@ -48,6 +48,7 @@ class Entry(models.Model): location_name = models.CharField(max_length=200, blank=True, null=True) state_name = models.CharField(max_length=200, blank=True, null=True) country_name = models.CharField(max_length=200, blank=True, null=True) + country_slug = models.CharField(max_length=200, blank=True, null=True) region_name = models.CharField(max_length=200, blank=True, null=True) PUB_STATUS = ( (0, 'Draft'), @@ -179,6 +180,8 @@ class Entry(models.Model): self.location_name = self.location.name self.state_name = self.location.state.name self.country_name = self.location.state.country.name + self.country_slug = self.location.state.country.slug + print(self.title) self.region_name = self.location.state.country.lux_region.name if created and not self.featured_image: self.featured_image = LuxImage.objects.latest() |