From 1aac795ba75e5be3d43f799a333e0cb41983a0ba Mon Sep 17 00:00:00 2001 From: Quentin Dufour Date: Thu, 2 Mar 2023 10:03:46 +0100 Subject: working relation --- static/admin/config.yml | 34 ++++++++++++++++++++-------------- 1 file changed, 20 insertions(+), 14 deletions(-) diff --git a/static/admin/config.yml b/static/admin/config.yml index 5f4cc4b..aed2864 100644 --- a/static/admin/config.yml +++ b/static/admin/config.yml @@ -1,14 +1,14 @@ backend: name: gitea - repo: foobar/guide.web.vimaire.machine.dufour.io - base_url: http://teabag.vimaire.machine.dufour.io - api_root: http://git.vimaire.machine.dufour.io/api/v1 - branch: main + repo: deuxfleurs/guide.deuxfleurs.fr + base_url: https://teabag.deuxfleurs.fr + api_root: https://git.deuxfleurs.fr/api/v1 + branch: cms media_folder: 'static/img/' site_url: http://guide.web.vimaire.machine.dufour.io display_url: http://guide.web.vimaire.machine.dufour.io -locale: 'en' +locale: 'fr' collections: - name: 'accueil' @@ -34,24 +34,30 @@ collections: - name: 'prise_en_main' label: 'Prise en main' folder: 'content/prise_en_main' - #summary: '{{title}} ({{dirname}})' editor: preview: false create: true - #nested: - # depth: 3 - # summary: '{{title}}' fields: - - label: Title + - label: Titre name: title widget: string - - label: Weight + - label: Poids name: weight widget: number - - label: Body + - label: Extra + name: extra + widget: object + fields: + - name: parent + label: Parent + widget: relation + collection: 'prise_en_main' + value_field: 'prise_en_main/{{filename}}.{{extension}}' + search_fields: [ 'title', 'filename', 'slug' ] + display_fields: ['{{title}} ({{filename}})', 'filename'] + - label: Corps name: body - widget: markdown - #meta: { path: { widget: string, label: 'Path', index_file: '_index' } } + widget: text - name: 'formations' label: 'Se former' -- cgit v1.2.3