annotate libervia/pages/merge-requests/new/page_meta.py @ 1389:ac4173fff71d

pages (lists/view): add `list_type` to `template_data`: when a service/node is used for the first time, schema is retrieved, and `list_type` is put in cache and used in template. This allows the template to have specialised views depending on the kind of list user is opening.
author Goffi <goffi@goffi.org>
date Sat, 27 Feb 2021 20:58:22 +0100
parents e3e303a30a74
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1216
b2d067339de3 python 3 port:
Goffi <goffi@goffi.org>
parents: 1145
diff changeset
1 #!/usr/bin/env python3
1239
f511f8fbbf8a fixed shebangs
Goffi <goffi@goffi.org>
parents: 1216
diff changeset
2
991
6ce9647011b3 pages(merge-requests): merge requests new, view and list pages implementations.
Goffi <goffi@goffi.org>
parents:
diff changeset
3
6ce9647011b3 pages(merge-requests): merge requests new, view and list pages implementations.
Goffi <goffi@goffi.org>
parents:
diff changeset
4 from libervia.server.constants import Const as C
6ce9647011b3 pages(merge-requests): merge requests new, view and list pages implementations.
Goffi <goffi@goffi.org>
parents:
diff changeset
5 from sat.core.log import getLogger
1113
cdd389ef97bc server: code style reformatting using black
Goffi <goffi@goffi.org>
parents: 991
diff changeset
6
1145
29eb15062416 pages: set __name__ for imported pages
Goffi <goffi@goffi.org>
parents: 1124
diff changeset
7 log = getLogger(__name__)
1378
e3e303a30a74 pages (tickets): renamed "tickets" to "lists":
Goffi <goffi@goffi.org>
parents: 1239
diff changeset
8
991
6ce9647011b3 pages(merge-requests): merge requests new, view and list pages implementations.
Goffi <goffi@goffi.org>
parents:
diff changeset
9
1216
b2d067339de3 python 3 port:
Goffi <goffi@goffi.org>
parents: 1145
diff changeset
10 name = "merge-requests_new"
991
6ce9647011b3 pages(merge-requests): merge requests new, view and list pages implementations.
Goffi <goffi@goffi.org>
parents:
diff changeset
11 access = C.PAGES_ACCESS_PUBLIC
1216
b2d067339de3 python 3 port:
Goffi <goffi@goffi.org>
parents: 1145
diff changeset
12 template = "merge-request/create.html"