Skip to content

Commit c0fdeb7

Browse files
committed
Merge branch 'new-ui'
2 parents 4bdd939 + fd6431e commit c0fdeb7

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+1936
-722
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Generated by Django 3.2.3 on 2021-07-22 23:21
2+
3+
from django.db import migrations, models
4+
5+
6+
class Migration(migrations.Migration):
7+
8+
dependencies = [
9+
('photos', '0010_auto_20210710_0959'),
10+
]
11+
12+
operations = [
13+
migrations.AlterField(
14+
model_name='tag',
15+
name='type',
16+
field=models.CharField(choices=[('L', 'Location'), ('O', 'Object'), ('F', 'Face'), ('C', 'Color'), ('S', 'Style'), ('G', 'Generic'), ('E', 'Event'), ('A', 'Album')], db_index=True, max_length=1, null=True),
17+
),
18+
]
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Generated by Django 3.2.3 on 2021-07-30 14:37
2+
3+
from django.db import migrations, models
4+
5+
6+
class Migration(migrations.Migration):
7+
8+
dependencies = [
9+
('photos', '0011_alter_tag_type'),
10+
]
11+
12+
operations = [
13+
migrations.AddField(
14+
model_name='photo',
15+
name='deleted',
16+
field=models.BooleanField(default=False),
17+
),
18+
]

photonix/photos/models.py

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,7 @@ class Photo(UUIDModel, VersionedModel):
136136
help_text='assign rating to photo', verbose_name="Rating", null=True, blank=True)
137137
preferred_photo_file = models.ForeignKey('PhotoFile', related_name='+', null=True, on_delete=models.SET_NULL) # File selected by the user that is the best version to be used
138138
thumbnailed_version = models.PositiveIntegerField(default=0) # Version from photos.utils.thumbnails.THUMBNAILER_VERSION at time of generating the required thumbnails declared in settings.THUMBNAIL_SIZES
139+
deleted = models.BooleanField(default=False)
139140

140141
class Meta:
141142
ordering = ['-taken_at']
@@ -224,17 +225,18 @@ def base_image_path(self):
224225

225226

226227
SOURCE_CHOICES = (
227-
('H', 'Human'),
228228
('C', 'Computer'),
229+
('H', 'Human'),
229230
)
230231
TAG_TYPE_CHOICES = (
231-
('L', 'Location'),
232-
('O', 'Object'),
233-
('F', 'Face'),
234-
('C', 'Color'),
232+
('A', 'Album'), # Assigned to an album by user
233+
('C', 'Color'), # Color detected by classifier
234+
('E', 'Event'), # Image creation date matches a festival or type of event
235+
('F', 'Face'), # Face detected by classifier
236+
('G', 'Generic'), # Tags assigned by user
237+
('L', 'Location'), # Location detected using GPS coordinates by classifier
238+
('O', 'Object'), # Object detected by classifier
235239
('S', 'Style'), # See Karayev et al.: Recognizing Image Style
236-
('G', 'Generic'), # Tags created by user
237-
('E', 'Event'), # Checked image taken date is any festival date.
238240
)
239241

240242

0 commit comments

Comments
 (0)