Replace django-moderation with CaseStudy.visible
This commit is contained in:
@ -16,9 +16,18 @@ class Shapefile(models.Model):
|
||||
)
|
||||
|
||||
|
||||
class CaseStudyQuerySet(models.QuerySet):
|
||||
def approved(self):
|
||||
return self.filter(
|
||||
approved=True
|
||||
)
|
||||
|
||||
|
||||
class CaseStudy(models.Model):
|
||||
"""Model for case studies submitted to the Ojuso Platform"""
|
||||
|
||||
approved = models.BooleanField(default=False)
|
||||
|
||||
# Choice lists for drop-downs
|
||||
SECTOR_CHOICES = (
|
||||
(_('Renewable Energy Generation'), (
|
||||
@ -965,6 +974,8 @@ class CaseStudy(models.Model):
|
||||
blank=True
|
||||
)
|
||||
|
||||
objects = CaseStudyQuerySet.as_manager()
|
||||
|
||||
def __str__(self):
|
||||
"""The String representation of the case study. (Entry name with country name.)"""
|
||||
return "%s in %s" % (self.entry_name, self.country.name)
|
||||
|
Reference in New Issue
Block a user