Mercurial > libervia-web
annotate libervia/web/pages/photos/album/page_meta.py @ 1518:eb00d593801d
refactoring: rename `libervia` to `libervia.web` + update imports following backend changes
author | Goffi <goffi@goffi.org> |
---|---|
date | Fri, 02 Jun 2023 16:49:28 +0200 |
parents | libervia/pages/photos/album/page_meta.py@106bae41f5c8 |
children |
rev | line source |
---|---|
1216 | 1 #!/usr/bin/env python3 |
1239 | 2 |
1070
46622cb54e6c
pages (photos): new photos/album page to use photo album view when displaying files, and display comments is available.
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
3 |
1518
eb00d593801d
refactoring: rename `libervia` to `libervia.web` + update imports following backend changes
Goffi <goffi@goffi.org>
parents:
1509
diff
changeset
|
4 from libervia.backend.core.i18n import D_ |
eb00d593801d
refactoring: rename `libervia` to `libervia.web` + update imports following backend changes
Goffi <goffi@goffi.org>
parents:
1509
diff
changeset
|
5 from libervia.backend.core.log import getLogger |
eb00d593801d
refactoring: rename `libervia` to `libervia.web` + update imports following backend changes
Goffi <goffi@goffi.org>
parents:
1509
diff
changeset
|
6 from libervia.web.server.constants import Const as C |
1070
46622cb54e6c
pages (photos): new photos/album page to use photo album view when displaying files, and display comments is available.
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
7 |
1145
29eb15062416
pages: set __name__ for imported pages
Goffi <goffi@goffi.org>
parents:
1124
diff
changeset
|
8 log = getLogger(__name__) |
1113
cdd389ef97bc
server: code style reformatting using black
Goffi <goffi@goffi.org>
parents:
1085
diff
changeset
|
9 |
1216 | 10 name = "photos_album" |
1418 | 11 label = D_("Photos Album") |
1070
46622cb54e6c
pages (photos): new photos/album page to use photo album view when displaying files, and display comments is available.
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
12 access = C.PAGES_ACCESS_PROFILE |
1216 | 13 template = "photo/album.html" |
1070
46622cb54e6c
pages (photos): new photos/album page to use photo album view when displaying files, and display comments is available.
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
14 |
1113
cdd389ef97bc
server: code style reformatting using black
Goffi <goffi@goffi.org>
parents:
1085
diff
changeset
|
15 |
1070
46622cb54e6c
pages (photos): new photos/album page to use photo album view when displaying files, and display comments is available.
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
16 def parse_url(self, request): |
1509
106bae41f5c8
massive refactoring from camelCase -> snake_case. See backend commit log for more details
Goffi <goffi@goffi.org>
parents:
1418
diff
changeset
|
17 self.get_path_args(request, ["service", "*path"], min_args=1, service="jid", path="") |
1113
cdd389ef97bc
server: code style reformatting using black
Goffi <goffi@goffi.org>
parents:
1085
diff
changeset
|
18 |
1070
46622cb54e6c
pages (photos): new photos/album page to use photo album view when displaying files, and display comments is available.
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
19 |
46622cb54e6c
pages (photos): new photos/album page to use photo album view when displaying files, and display comments is available.
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
20 def prepare_render(self, request): |
1509
106bae41f5c8
massive refactoring from camelCase -> snake_case. See backend commit log for more details
Goffi <goffi@goffi.org>
parents:
1418
diff
changeset
|
21 data = self.get_r_data(request) |
1326
089742e065e3
pages (files/list, photos/album): updated thumbnails size limits
Goffi <goffi@goffi.org>
parents:
1239
diff
changeset
|
22 data["thumb_limit"] = 800 |
1113
cdd389ef97bc
server: code style reformatting using black
Goffi <goffi@goffi.org>
parents:
1085
diff
changeset
|
23 data["retrieve_comments"] = True |
1509
106bae41f5c8
massive refactoring from camelCase -> snake_case. See backend commit log for more details
Goffi <goffi@goffi.org>
parents:
1418
diff
changeset
|
24 files_page = self.get_page_by_name("files_list") |
1070
46622cb54e6c
pages (photos): new photos/album page to use photo album view when displaying files, and display comments is available.
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
25 return files_page.prepare_render(self, request) |
46622cb54e6c
pages (photos): new photos/album page to use photo album view when displaying files, and display comments is available.
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
26 |
1113
cdd389ef97bc
server: code style reformatting using black
Goffi <goffi@goffi.org>
parents:
1085
diff
changeset
|
27 |
1070
46622cb54e6c
pages (photos): new photos/album page to use photo album view when displaying files, and display comments is available.
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
28 def on_data_post(self, request): |
1509
106bae41f5c8
massive refactoring from camelCase -> snake_case. See backend commit log for more details
Goffi <goffi@goffi.org>
parents:
1418
diff
changeset
|
29 blog_page = self.get_page_by_name("blog_view") |
1070
46622cb54e6c
pages (photos): new photos/album page to use photo album view when displaying files, and display comments is available.
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
30 return blog_page.on_data_post(self, request) |