photo-objects 0.1.0__py3-none-any.whl → 0.2.1__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.
- photo_objects/django/templatetags/photo_objects_extras.py +2 -2
- photo_objects/django/urls.py +1 -10
- photo_objects/django/views/ui/__init__.py +1 -0
- photo_objects/django/views/ui/album.py +6 -6
- photo_objects/django/views/ui/photo.py +0 -1
- photo_objects/django/views/ui/users.py +23 -0
- {photo_objects-0.1.0.dist-info → photo_objects-0.2.1.dist-info}/METADATA +1 -1
- {photo_objects-0.1.0.dist-info → photo_objects-0.2.1.dist-info}/RECORD +11 -10
- {photo_objects-0.1.0.dist-info → photo_objects-0.2.1.dist-info}/WHEEL +0 -0
- {photo_objects-0.1.0.dist-info → photo_objects-0.2.1.dist-info}/licenses/LICENSE +0 -0
- {photo_objects-0.1.0.dist-info → photo_objects-0.2.1.dist-info}/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
from django import template
|
|
2
2
|
|
|
3
|
-
from photo_objects.django.
|
|
3
|
+
from photo_objects.django.api.album import get_site_album
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
register = template.Library()
|
|
@@ -41,7 +41,7 @@ def meta_og(context):
|
|
|
41
41
|
try:
|
|
42
42
|
request = context.get("request")
|
|
43
43
|
site = request.site
|
|
44
|
-
album =
|
|
44
|
+
album = get_site_album(site.id)
|
|
45
45
|
|
|
46
46
|
return {
|
|
47
47
|
'request': request,
|
photo_objects/django/urls.py
CHANGED
|
@@ -68,16 +68,7 @@ urlpatterns = [
|
|
|
68
68
|
# TODO: img/<str:album_key>/<str:photo_key>/<str:size_key> path
|
|
69
69
|
path(
|
|
70
70
|
"users/login",
|
|
71
|
-
|
|
72
|
-
template_name="photo_objects/form.html",
|
|
73
|
-
extra_context={
|
|
74
|
-
"title": "Login",
|
|
75
|
-
"action": "Login",
|
|
76
|
-
"back": BackLink(
|
|
77
|
-
f'Back to albums',
|
|
78
|
-
reverse_lazy('photo_objects:list_albums')),
|
|
79
|
-
},
|
|
80
|
-
),
|
|
71
|
+
ui.login,
|
|
81
72
|
name="login",
|
|
82
73
|
),
|
|
83
74
|
path(
|
|
@@ -51,13 +51,13 @@ def new_album(request: HttpRequest):
|
|
|
51
51
|
def get_info(request: HttpRequest, album_key: str):
|
|
52
52
|
site_id = parse_site_id(album_key)
|
|
53
53
|
if site_id is not None and request.site:
|
|
54
|
-
return (
|
|
54
|
+
return render_markdown(
|
|
55
55
|
"This is a special album for configuring site metadata for "
|
|
56
|
-
f"{request.site.name}
|
|
57
|
-
"albums cover photo to configure the preview image, and
|
|
58
|
-
"description to configure the site description. The album
|
|
59
|
-
"is automatically updated when the related sites name is
|
|
60
|
-
"and vice versa.")
|
|
56
|
+
f"**{request.site.name}**. Use album title to change the site "
|
|
57
|
+
"name, albums cover photo to configure the preview image, and "
|
|
58
|
+
"album description to configure the site description. The album "
|
|
59
|
+
"title is automatically updated when the related sites name is "
|
|
60
|
+
"changed and vice versa.")
|
|
61
61
|
|
|
62
62
|
|
|
63
63
|
@json_problem_as_html
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
from django.http import HttpRequest, HttpResponseRedirect
|
|
2
2
|
from django.shortcuts import render
|
|
3
3
|
from django.urls import reverse
|
|
4
|
-
from django.utils.safestring import mark_safe
|
|
5
4
|
|
|
6
5
|
from photo_objects.django import api
|
|
7
6
|
from photo_objects.django.api.utils import AlbumNotFound, FormValidationFailed
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
from django.contrib.auth import views as auth_views
|
|
2
|
+
from django.http import HttpRequest
|
|
3
|
+
from django.urls import reverse_lazy
|
|
4
|
+
|
|
5
|
+
from photo_objects.django.api.album import get_site_album
|
|
6
|
+
from photo_objects.django.views.utils import BackLink
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
def login(request: HttpRequest):
|
|
10
|
+
album, _ = get_site_album(request.site)
|
|
11
|
+
|
|
12
|
+
return auth_views.LoginView.as_view(
|
|
13
|
+
template_name="photo_objects/form.html",
|
|
14
|
+
extra_context={
|
|
15
|
+
"title": "Login",
|
|
16
|
+
"photo": album.cover_photo,
|
|
17
|
+
"action": "Login",
|
|
18
|
+
"back": BackLink(
|
|
19
|
+
f'Back to albums',
|
|
20
|
+
reverse_lazy('photo_objects:list_albums')),
|
|
21
|
+
"class": "login"
|
|
22
|
+
},
|
|
23
|
+
)(request)
|
|
@@ -10,7 +10,7 @@ photo_objects/django/forms.py,sha256=VoDlyZAwiTLyNxW3rRk5bzjfPJvNuKV-wpuLGCe5TCY
|
|
|
10
10
|
photo_objects/django/models.py,sha256=tRHBqswASWMnyz8rwiKsmHDqEvQX54ly9k8tvU7qNOM,4597
|
|
11
11
|
photo_objects/django/objsto.py,sha256=GZuoPZ1I5qX4rwEYZlOfZZiV4NQ19iknQBT6755421Y,2417
|
|
12
12
|
photo_objects/django/signals.py,sha256=NEh_pfvsSt2f7MuHIJE0uLHUkqjKH4ipAFS7tmvm9LI,2400
|
|
13
|
-
photo_objects/django/urls.py,sha256=
|
|
13
|
+
photo_objects/django/urls.py,sha256=ZBzTTYSLkeyuGM_NdSDzz_Yt4xs6hwIFhz04j59Q1r8,2023
|
|
14
14
|
photo_objects/django/api/__init__.py,sha256=BnEHlm3mwyBy-1xhk-NFasgZa4fjCDjtfkBUoH0puPY,62
|
|
15
15
|
photo_objects/django/api/album.py,sha256=c5qDvy6ebIZCzggxcYgSgLBR0cco79V47nJf2OHuBj8,2486
|
|
16
16
|
photo_objects/django/api/auth.py,sha256=LfMm02_TKwrP5XFie-KzBnW3FNFWQAafBlu0UE19Gd4,1370
|
|
@@ -26,7 +26,7 @@ photo_objects/django/migrations/0003_admin_visibility.py,sha256=PdxPOJzr-ViRBlOY
|
|
|
26
26
|
photo_objects/django/migrations/0004_camera_setup_and_settings.py,sha256=CS5xyIHgBE2Y7-PSJ52ffRQeCzs8p899px9upomk4O8,1844
|
|
27
27
|
photo_objects/django/migrations/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
28
28
|
photo_objects/django/templatetags/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
29
|
-
photo_objects/django/templatetags/photo_objects_extras.py,sha256=
|
|
29
|
+
photo_objects/django/templatetags/photo_objects_extras.py,sha256=JD6SHx3gmne5HdrwNlWOMqbGhcTfzNV9nV1bdNhlgto,1199
|
|
30
30
|
photo_objects/django/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
31
31
|
photo_objects/django/tests/test_album.py,sha256=qeRx_M8EvY9n_as1x8-EWtp9Ob1kOPGnUfZuUnMfDO4,13979
|
|
32
32
|
photo_objects/django/tests/test_auth.py,sha256=su00EypNzGQcvxqhmOtFevZriK31pY7yD1HxpQFcUT4,3928
|
|
@@ -40,13 +40,14 @@ photo_objects/django/views/api/album.py,sha256=EZMOkxYzLSWr9wwXnd4yAO64JtXZq2k3F
|
|
|
40
40
|
photo_objects/django/views/api/auth.py,sha256=N53csbthH0DEMFjY3fqhtLmtdL7xqzkatktywjqZ8h0,819
|
|
41
41
|
photo_objects/django/views/api/photo.py,sha256=52UMP1r6TN_xfu8fHE25yOUiTa6W1F2XbgEichM8tTE,3526
|
|
42
42
|
photo_objects/django/views/api/utils.py,sha256=uQzKdSKHRAux5OZzqgWQr0gsK_FeweQP0cg_67OWA_Y,264
|
|
43
|
-
photo_objects/django/views/ui/__init__.py,sha256=
|
|
44
|
-
photo_objects/django/views/ui/album.py,sha256=
|
|
43
|
+
photo_objects/django/views/ui/__init__.py,sha256=N3ro5KggdV-JnfyHwoStX73b3SbVbpcsMuQNlxntVJs,92
|
|
44
|
+
photo_objects/django/views/ui/album.py,sha256=gOVwkpNZFytTrEU0N6OfJu4U4l85AIbL6b0L6x0eA4E,5232
|
|
45
45
|
photo_objects/django/views/ui/configuration.py,sha256=pzNRHq3FSrVCTx2R31_FW3A3aJxzEO4pDnXsOVS75uA,5576
|
|
46
|
-
photo_objects/django/views/ui/photo.py,sha256=
|
|
46
|
+
photo_objects/django/views/ui/photo.py,sha256=fxjb47cxcT08pcYFcYIULpT4duKqK99zw5mgvKJx150,5994
|
|
47
|
+
photo_objects/django/views/ui/users.py,sha256=nlJyW7rhmr-ZR4LeSHMRPVmJzpiyHCEB2ry6uH2ihOc,713
|
|
47
48
|
photo_objects/django/views/ui/utils.py,sha256=YV_YcUbX-zUkdFnBlezPChR6aPDhZJ9loSOHBSzF6Cc,273
|
|
48
|
-
photo_objects-0.1.
|
|
49
|
-
photo_objects-0.1.
|
|
50
|
-
photo_objects-0.1.
|
|
51
|
-
photo_objects-0.1.
|
|
52
|
-
photo_objects-0.1.
|
|
49
|
+
photo_objects-0.2.1.dist-info/licenses/LICENSE,sha256=V3w6hTjXfP65F4r_mejveHcV5igHrblxao3-2RlfVlA,1068
|
|
50
|
+
photo_objects-0.2.1.dist-info/METADATA,sha256=lO7WJhmvO4b0VsvmN_1nQ2DXkMSmjiYLlcpLb79JYUE,3671
|
|
51
|
+
photo_objects-0.2.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
52
|
+
photo_objects-0.2.1.dist-info/top_level.txt,sha256=SZeL8mhf-WMGdhRtTGFvZc3aIRBboQls9O0cFDMGdQ0,14
|
|
53
|
+
photo_objects-0.2.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|