photo-objects 0.0.3__py3-none-any.whl → 0.0.5__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -32,6 +32,7 @@ def _objsto_test_settings():
32
32
  return {
33
33
  **settings.PHOTO_OBJECTS_OBJSTO,
34
34
  "BUCKET": "test-bucket",
35
+ "SECURE": False,
35
36
  }
36
37
 
37
38
 
@@ -60,8 +60,8 @@ def domain_matches_request(request: HttpRequest) -> Validation:
60
60
  ok = request.get_host() == request.site.domain
61
61
  if not ok:
62
62
  detail = (
63
- f'Host in the request does not match domain configured for '
64
- 'the site: expected "{domain}", got "{host}".')
63
+ 'Host in the request does not match domain configured for '
64
+ f'the site: expected "{domain}", got "{host}".')
65
65
  except Exception as e:
66
66
  ok = False
67
67
  detail = (
@@ -41,17 +41,19 @@ def upload_photos(request: HttpRequest, album_key: str):
41
41
  })
42
42
 
43
43
 
44
- def _camera_setup(photo: Photo):
45
- r = []
44
+ def _camera(photo: Photo):
46
45
  if photo.camera_make or photo.camera_model:
47
- r.append(
48
- " ".join(i for i in [
46
+ return " ".join(i for i in [
49
47
  photo.camera_make,
50
48
  photo.camera_model,
51
- ] if i))
49
+ ] if i)
50
+ return None
51
+
52
+
53
+ def _lens(photo: Photo):
52
54
  if photo.lens_make or photo.lens_model:
53
- r.append(" ".join(i for i in [photo.lens_make, photo.lens_model] if i))
54
- return r
55
+ return " ".join(i for i in [photo.lens_make, photo.lens_model] if i)
56
+ return None
55
57
 
56
58
 
57
59
  def _exposure_time_to_string(exposure_time: float | None):
@@ -107,7 +109,8 @@ def show_photo(request: HttpRequest, album_key: str, photo_key: str):
107
109
  details = {
108
110
  "Description": render_markdown(photo.description),
109
111
  "Timestamp": photo.timestamp,
110
- "Camera": _camera_setup(photo),
112
+ "Camera": _camera(photo),
113
+ "Lens": _lens(photo),
111
114
  "Settings": _camera_settings(photo),
112
115
  }
113
116
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: photo-objects
3
- Version: 0.0.3
3
+ Version: 0.0.5
4
4
  Summary: Application for storing photos in S3 compatible object-storage.
5
5
  Author: Toni Kangas
6
6
  License: MIT License
@@ -32,7 +32,7 @@ photo_objects/django/tests/test_album.py,sha256=eforhWjaL3ZD7aENrjzbVhXHLI9WpY8p
32
32
  photo_objects/django/tests/test_auth.py,sha256=su00EypNzGQcvxqhmOtFevZriK31pY7yD1HxpQFcUT4,3928
33
33
  photo_objects/django/tests/test_photo.py,sha256=SpQsVynzJLP2F9qYrvZMzCBSiHvsRDpOZ8-W_07K_q8,13386
34
34
  photo_objects/django/tests/test_utils.py,sha256=DkhzDtZqu5OXg-IKzqHz2GY0sFS8RbwYC3w81RuPxS4,1259
35
- photo_objects/django/tests/utils.py,sha256=9GSUw78XRfXshbQrWkxZzXUh9YjoU4clQ5Sp2keGJ1A,2467
35
+ photo_objects/django/tests/utils.py,sha256=lcs1yL-oqLGFkV-NZNf_lOOuiZZZaSQNi7iznHm7BHY,2492
36
36
  photo_objects/django/views/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
37
37
  photo_objects/django/views/utils.py,sha256=369CUBWwm6LGh7wX1QVqIPE_K_6nb7ePEgHWvV2sKOw,245
38
38
  photo_objects/django/views/api/__init__.py,sha256=SxK-b7MgMtD9VRMz46rDV5qtm6AvkRcg3Moa1AWl5pY,108
@@ -42,11 +42,11 @@ photo_objects/django/views/api/photo.py,sha256=52UMP1r6TN_xfu8fHE25yOUiTa6W1F2Xb
42
42
  photo_objects/django/views/api/utils.py,sha256=uQzKdSKHRAux5OZzqgWQr0gsK_FeweQP0cg_67OWA_Y,264
43
43
  photo_objects/django/views/ui/__init__.py,sha256=vbFXPj5liue-M_CXQGP5PKhD98Z5ev53yKLPU8zWpUs,71
44
44
  photo_objects/django/views/ui/album.py,sha256=bgFPg9ipkQFqZK7cQgYT9gqpUgdSJ_1NTHlszsfclKU,5010
45
- photo_objects/django/views/ui/configuration.py,sha256=6u2qea2XhAE7eNRej9OA65UHZiRQN57G0re1T-BglAo,3375
46
- photo_objects/django/views/ui/photo.py,sha256=Xct76YoO3fUmqsQ7sY43JO_gaw2NIld16QNvAOfYGJM,6018
45
+ photo_objects/django/views/ui/configuration.py,sha256=yDKlJUx5LexmpvvTPEZTH3RPtxMgXVInmNCFS-0sZv8,3375
46
+ photo_objects/django/views/ui/photo.py,sha256=F7tqI_mtGFnelROTQbGmkK21OylheavoRzFgjlah1j0,6052
47
47
  photo_objects/django/views/ui/utils.py,sha256=YV_YcUbX-zUkdFnBlezPChR6aPDhZJ9loSOHBSzF6Cc,273
48
- photo_objects-0.0.3.dist-info/licenses/LICENSE,sha256=V3w6hTjXfP65F4r_mejveHcV5igHrblxao3-2RlfVlA,1068
49
- photo_objects-0.0.3.dist-info/METADATA,sha256=nWl7HVknzOYcmEvyhwjkotBueiSZZoYS3hz5K1TxG7E,3671
50
- photo_objects-0.0.3.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
51
- photo_objects-0.0.3.dist-info/top_level.txt,sha256=SZeL8mhf-WMGdhRtTGFvZc3aIRBboQls9O0cFDMGdQ0,14
52
- photo_objects-0.0.3.dist-info/RECORD,,
48
+ photo_objects-0.0.5.dist-info/licenses/LICENSE,sha256=V3w6hTjXfP65F4r_mejveHcV5igHrblxao3-2RlfVlA,1068
49
+ photo_objects-0.0.5.dist-info/METADATA,sha256=kk7aGjK22N5bfvCH4XNpanw4Yaj3HlI7t5yTPfkhgmc,3671
50
+ photo_objects-0.0.5.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
51
+ photo_objects-0.0.5.dist-info/top_level.txt,sha256=SZeL8mhf-WMGdhRtTGFvZc3aIRBboQls9O0cFDMGdQ0,14
52
+ photo_objects-0.0.5.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (78.1.0)
2
+ Generator: setuptools (80.9.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5