Skip to content

Commit

Permalink
Soft delete improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
MaertHaekkinen committed Jul 8, 2024
1 parent a90264a commit 07964b7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion ajapaik/ajapaik/migrations/0026_photo_soft_deleted.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ class Migration(migrations.Migration):
migrations.AddField(
model_name='photo',
name='soft_deleted',
field=models.BooleanField(default=False, help_text='Hide image from being accessed outside of Admin'),
field=models.BooleanField(default=False, help_text='Hide image from being accessed, even in ADMIN!'),
),
]
5 changes: 3 additions & 2 deletions ajapaik/ajapaik/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -545,7 +545,7 @@ def get_queryset(self):


class Photo(Model):
objects = EstimatedCountManager()
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',
Expand Down Expand Up @@ -659,7 +659,8 @@ class Photo(Model):
viewpoint_elevation = PositiveSmallIntegerField(_('Viewpoint elevation'), choices=VIEWPOINT_ELEVATION_CHOICES,
blank=True, null=True)
description_original_language = CharField(_('Description original language'), max_length=255, blank=True, null=True)
soft_deleted = BooleanField(default=False, help_text=_("Hide image from being accessed outside of Admin"))
# TODO: Migrate to use proxy model for admin
soft_deleted = BooleanField(default=False, help_text=_("Hide image from being accessed, even in ADMIN!"))

original_lat = None
original_lon = None
Expand Down

0 comments on commit 07964b7

Please sign in to comment.