diff --git a/ajapaik/ajapaik/models.py b/ajapaik/ajapaik/models.py index 4c91f4391..c6ab329d9 100644 --- a/ajapaik/ajapaik/models.py +++ b/ajapaik/ajapaik/models.py @@ -537,9 +537,16 @@ def get_album_type(self): return Album.TYPE_CHOICES[self.atype][1] +# Ugly hack to exclude specific photos for some whiny individuals +class PhotoManager(EstimatedCountManager): + def get_queryset(self): + return super(PhotoManager, self).get_queryset().exclude(source_key__startswith="ERM Fk 2903").exclude( + source_key__startswith="TLM F 10198:") + + class Photo(Model): objects = EstimatedCountManager() - bulk = BulkUpdateManager() + objects = PhotoManager() # Removed sorl ImageField because of https://github.com/mariocesar/sorl-thumbnail/issues/295 image = ImageField(_('Image'), upload_to='uploads', blank=True, null=True, max_length=255, height_field='height',