Mercurial > libervia-web
annotate libervia/pages/photos/album/page_meta.py @ 1378:e3e303a30a74
pages (tickets): renamed "tickets" to "lists":
"lists" is more generic, and tickets is actually a specific kind of list.
/!\ "tickets_trackers_json" option has been renamed to "lists_directory_json".
author | Goffi <goffi@goffi.org> |
---|---|
date | Thu, 28 Jan 2021 18:51:44 +0100 |
parents | 089742e065e3 |
children | d6bcb0cf92d2 |
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 |
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
|
4 from libervia.server.constants import Const as C |
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
|
5 from sat.core.log import getLogger |
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
|
6 |
1145
29eb15062416
pages: set __name__ for imported pages
Goffi <goffi@goffi.org>
parents:
1124
diff
changeset
|
7 log = getLogger(__name__) |
1113
cdd389ef97bc
server: code style reformatting using black
Goffi <goffi@goffi.org>
parents:
1085
diff
changeset
|
8 |
1216 | 9 name = "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
|
10 access = C.PAGES_ACCESS_PROFILE |
1216 | 11 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
|
12 |
1113
cdd389ef97bc
server: code style reformatting using black
Goffi <goffi@goffi.org>
parents:
1085
diff
changeset
|
13 |
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 def parse_url(self, request): |
1113
cdd389ef97bc
server: code style reformatting using black
Goffi <goffi@goffi.org>
parents:
1085
diff
changeset
|
15 self.getPathArgs(request, ["service", "*path"], min_args=1, service="jid", path="") |
cdd389ef97bc
server: code style reformatting using black
Goffi <goffi@goffi.org>
parents:
1085
diff
changeset
|
16 |
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
|
17 |
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
|
18 def 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
|
19 data = self.getRData(request) |
1326
089742e065e3
pages (files/list, photos/album): updated thumbnails size limits
Goffi <goffi@goffi.org>
parents:
1239
diff
changeset
|
20 data["thumb_limit"] = 800 |
1113
cdd389ef97bc
server: code style reformatting using black
Goffi <goffi@goffi.org>
parents:
1085
diff
changeset
|
21 data["retrieve_comments"] = True |
1216 | 22 files_page = self.getPageByName("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
|
23 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
|
24 |
1113
cdd389ef97bc
server: code style reformatting using black
Goffi <goffi@goffi.org>
parents:
1085
diff
changeset
|
25 |
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
|
26 def on_data_post(self, request): |
1216 | 27 blog_page = self.getPageByName("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
|
28 return blog_page.on_data_post(self, request) |