Add points of interest
Do a bunch of refactoring in the process. Current display on homepage is a little shonky but that can be improved when there is something using it.
This commit is contained in:
@ -1015,6 +1015,14 @@ class CaseStudy(models.Model):
|
||||
|
||||
|
||||
|
||||
|
||||
class PointOfInterestQuerySet(models.QuerySet):
|
||||
def approved(self):
|
||||
return self.filter(
|
||||
approved=True
|
||||
)
|
||||
|
||||
|
||||
class PointOfInterest(models.Model):
|
||||
class Meta:
|
||||
verbose_name_plural = 'points of interest'
|
||||
@ -1022,6 +1030,8 @@ class PointOfInterest(models.Model):
|
||||
def __str__(self):
|
||||
return self.title
|
||||
|
||||
objects = PointOfInterestQuerySet.as_manager()
|
||||
|
||||
author = models.ForeignKey(
|
||||
User,
|
||||
models.SET_NULL,
|
||||
|
Reference in New Issue
Block a user