Show private photos count for admins
This commit is contained in:
parent
aa45386976
commit
7d6d965191
2 changed files with 6 additions and 0 deletions
|
|
@ -187,7 +187,12 @@ class Gallery(models.Model):
|
|||
else:
|
||||
return self.photos.count()
|
||||
|
||||
def photo_private_count(self):
|
||||
"""Return a count of private photos in this gallery."""
|
||||
return self.photos.filter(is_public=False).count()
|
||||
|
||||
photo_count.short_description = _('count')
|
||||
photo_private_count.short_description = _('private count')
|
||||
|
||||
|
||||
class ImageModel(models.Model):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue