summaryrefslogtreecommitdiff
path: root/app/jrnl/models.py
diff options
context:
space:
mode:
Diffstat (limited to 'app/jrnl/models.py')
-rw-r--r--app/jrnl/models.py10
1 files changed, 0 insertions, 10 deletions
diff --git a/app/jrnl/models.py b/app/jrnl/models.py
index dca4cd4..6c334ae 100644
--- a/app/jrnl/models.py
+++ b/app/jrnl/models.py
@@ -45,11 +45,6 @@ class Entry(models.Model):
enable_comments = models.BooleanField(default=False)
point = models.PointField(null=True, blank=True)
location = models.ForeignKey(Location, on_delete=models.CASCADE, null=True, blank=True)
- 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'),
(1, 'Published'),
@@ -177,11 +172,6 @@ class Entry(models.Model):
self.location = Location.objects.filter(geometry__contains=self.point).get()
except Location.DoesNotExist:
raise forms.ValidationError("There is no location associated with that point, add it: %sadmin/locations/location/add/" % (settings.BASE_URL))
- 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
- self.region_name = self.location.state.country.lux_region.name
if created and not self.featured_image:
self.featured_image = LuxImage.objects.latest()
old = type(self).objects.get(pk=self.pk) if self.pk else None