Make all galleries public
This commit is contained in:
parent
8b768108d2
commit
4b3cf83181
7 changed files with 24 additions and 31 deletions
|
|
@ -15,7 +15,6 @@ import exifread
|
|||
from django.conf import settings
|
||||
from django.core.exceptions import ValidationError
|
||||
from django.core.files.base import ContentFile
|
||||
from django.core.files.storage import default_storage
|
||||
from django.core.validators import RegexValidator
|
||||
from django.db import models
|
||||
from django.template.defaultfilters import slugify
|
||||
|
|
@ -153,10 +152,6 @@ class Gallery(models.Model):
|
|||
verbose_name=_('tags'),
|
||||
blank=True,
|
||||
)
|
||||
is_public = models.BooleanField(_('is public'),
|
||||
default=True,
|
||||
help_text=_('Public galleries will be displayed '
|
||||
'in the default views.'))
|
||||
photos = models.ManyToManyField('photologue.Photo',
|
||||
related_name='galleries',
|
||||
verbose_name=_('photos'),
|
||||
|
|
@ -500,7 +495,7 @@ class Photo(ImageModel):
|
|||
|
||||
def public_galleries(self):
|
||||
"""Return the public galleries to which this photo belongs."""
|
||||
return self.galleries.filter(is_public=True)
|
||||
return self.galleries
|
||||
|
||||
def get_previous_in_gallery(self, gallery):
|
||||
"""Find the neighbour of this photo in the supplied gallery.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue