From 0f1e05acdd40140d66139cc3dae15951e2b2a479 Mon Sep 17 00:00:00 2001 From: Evarin Date: Mon, 4 Feb 2019 22:50:27 +0100 Subject: [PATCH] Migration vers Wagtail 2.3 et Wagtail-modeltranslation 0.9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Toutes les pages Wagtail doivent désormais être traduites Suppression du modèle COFUtilPage devenu inutile Réinitialisation des migrations de Wagtail à cause des changements de ModelTranslation --- cof/settings/common.py | 38 +- cof/urls.py | 6 +- gestioncof/cms/fixtures/cofcms.json | 1193 ----------------- gestioncof/cms/migrations/0001_initial.py | 966 +------------ .../cms/migrations/0002_utilpage_and_fixes.py | 160 --- gestioncof/cms/models.py | 58 +- gestioncof/cms/templates/cofcms/base_nav.html | 4 +- gestioncof/cms/templatetags/cofcms_tags.py | 8 +- gestioncof/cms/translation.py | 14 +- kfet/cms/hooks.py | 2 +- .../management/commands/kfet_loadwagtail.py | 2 +- kfet/cms/migrations/0001_initial.py | 30 +- kfet/cms/models.py | 14 +- kfet/cms/translation.py | 11 + provisioning/prepare_django.sh | 1 + requirements.txt | 6 +- 16 files changed, 166 insertions(+), 2347 deletions(-) delete mode 100644 gestioncof/cms/fixtures/cofcms.json delete mode 100644 gestioncof/cms/migrations/0002_utilpage_and_fixes.py create mode 100644 kfet/cms/translation.py diff --git a/cof/settings/common.py b/cof/settings/common.py index 003cd6ce..9e8764f2 100644 --- a/cof/settings/common.py +++ b/cof/settings/common.py @@ -65,6 +65,12 @@ INSTALLED_APPS = [ "django.contrib.sites", "django.contrib.messages", "django.contrib.staticfiles", + # Must be before django admin + # https://github.com/infoportugal/wagtail-modeltranslation/issues/193 + "wagtail_modeltranslation", + "wagtail_modeltranslation.makemigrations", + "wagtail_modeltranslation.migrate", + "modeltranslation", "django.contrib.admin", "django.contrib.admindocs", "bda", @@ -78,21 +84,20 @@ INSTALLED_APPS = [ "widget_tweaks", "custommail", "djconfig", - "wagtail.wagtailforms", - "wagtail.wagtailredirects", - "wagtail.wagtailembeds", - "wagtail.wagtailsites", - "wagtail.wagtailusers", - "wagtail.wagtailsnippets", - "wagtail.wagtaildocs", - "wagtail.wagtailimages", - "wagtail.wagtailsearch", - "wagtail.wagtailadmin", - "wagtail.wagtailcore", + "wagtail.contrib.forms", + "wagtail.contrib.redirects", + "wagtail.embeds", + "wagtail.sites", + "wagtail.users", + "wagtail.snippets", + "wagtail.documents", + "wagtail.images", + "wagtail.search", + "wagtail.admin", + "wagtail.core", "wagtail.contrib.modeladmin", - "wagtail.contrib.wagtailroutablepage", + "wagtail.contrib.routable_page", "wagtailmenus", - "wagtail_modeltranslation", "modelcluster", "taggit", "kfet.auth", @@ -113,8 +118,8 @@ MIDDLEWARE = [ "django.middleware.clickjacking.XFrameOptionsMiddleware", "django.middleware.security.SecurityMiddleware", "djconfig.middleware.DjConfigMiddleware", - "wagtail.wagtailcore.middleware.SiteMiddleware", - "wagtail.wagtailredirects.middleware.RedirectMiddleware", + "wagtail.core.middleware.SiteMiddleware", + "wagtail.contrib.redirects.middleware.RedirectMiddleware", "django.middleware.locale.LocaleMiddleware", ] @@ -257,3 +262,6 @@ FORMAT_MODULE_PATH = "cof.locale" WAGTAIL_SITE_NAME = "GestioCOF" WAGTAIL_ENABLE_UPDATE_CHECK = False TAGGIT_CASE_INSENSITIVE = True + +WAGTAILMENUS_DEFAULT_CHILDREN_MENU_USE_SPECIFIC = 3 +WAGTAILMENUS_DEFAULT_SECTION_MENU_USE_SPECIFIC = 3 diff --git a/cof/urls.py b/cof/urls.py index 19a0581f..aab91130 100644 --- a/cof/urls.py +++ b/cof/urls.py @@ -10,9 +10,9 @@ from django.contrib import admin from django.contrib.auth import views as django_views from django.views.generic.base import TemplateView from django_cas_ng import views as django_cas_views -from wagtail.wagtailadmin import urls as wagtailadmin_urls -from wagtail.wagtailcore import urls as wagtail_urls -from wagtail.wagtaildocs import urls as wagtaildocs_urls +from wagtail.admin import urls as wagtailadmin_urls +from wagtail.core import urls as wagtail_urls +from wagtail.documents import urls as wagtaildocs_urls from gestioncof import csv_views, views as gestioncof_views from gestioncof.autocomplete import autocomplete diff --git a/gestioncof/cms/fixtures/cofcms.json b/gestioncof/cms/fixtures/cofcms.json deleted file mode 100644 index 5517b4f7..00000000 --- a/gestioncof/cms/fixtures/cofcms.json +++ /dev/null @@ -1,1193 +0,0 @@ -[ -{ - "model": "wagtailcore.page", - "pk": 11, - "fields": { - "path": "000100010002", - "depth": 3, - "numchild": 6, - "title": "Site du COF", - "slug": "site", - "content_type": [ - "cofcms", - "cofrootpage" - ], - "live": true, - "has_unpublished_changes": false, - "url_path": "/global/site/", - "owner": [ - "root" - ], - "seo_title": "Accueil", - "show_in_menus": true, - "search_description": "", - "go_live_at": null, - "expire_at": null, - "expired": false, - "locked": false, - "first_published_at": "2018-01-22T18:43:08.377Z", - "last_published_at": "2018-01-28T21:08:40.416Z", - "latest_revision_created_at": "2018-01-28T21:08:38.791Z", - "live_revision": null - } -}, -{ - "model": "wagtailcore.page", - "pk": 12, - "fields": { - "path": "0001000100020001", - "depth": 4, - "numchild": 3, - "title": "Actualit\u00e9s", - "slug": "actualites", - "content_type": [ - "cofcms", - "cofactuindexpage" - ], - "live": true, - "has_unpublished_changes": false, - "url_path": "/global/site/actualites/", - "owner": [ - "root" - ], - "seo_title": "", - "show_in_menus": true, - "search_description": "", - "go_live_at": null, - "expire_at": null, - "expired": false, - "locked": false, - "first_published_at": "2018-01-22T18:45:07.969Z", - "last_published_at": "2018-01-22T18:45:07.752Z", - "latest_revision_created_at": "2018-01-22T18:45:07.752Z", - "live_revision": null - } -}, -{ - "model": "wagtailcore.page", - "pk": 13, - "fields": { - "path": "0001000100020002", - "depth": 4, - "numchild": 0, - "title": "Pr\u00e9sentation", - "slug": "pr\u00e9sentation", - "content_type": [ - "cofcms", - "cofpage" - ], - "live": true, - "has_unpublished_changes": false, - "url_path": "/global/site/pr\u00e9sentation/", - "owner": [ - "root" - ], - "seo_title": "", - "show_in_menus": true, - "search_description": "", - "go_live_at": null, - "expire_at": null, - "expired": false, - "locked": false, - "first_published_at": "2018-01-22T18:47:15.337Z", - "last_published_at": "2018-01-22T20:10:37.728Z", - "latest_revision_created_at": "2018-01-22T20:10:37.728Z", - "live_revision": null - } -}, -{ - "model": "wagtailcore.page", - "pk": 14, - "fields": { - "path": "0001000100020003", - "depth": 4, - "numchild": 2, - "title": "Clubs", - "slug": "clubs", - "content_type": [ - "cofcms", - "cofdirectorypage" - ], - "live": true, - "has_unpublished_changes": false, - "url_path": "/global/site/clubs/", - "owner": [ - "root" - ], - "seo_title": "", - "show_in_menus": true, - "search_description": "", - "go_live_at": null, - "expire_at": null, - "expired": false, - "locked": false, - "first_published_at": "2018-01-22T18:58:18.232Z", - "last_published_at": "2018-01-22T19:02:50.157Z", - "latest_revision_created_at": "2018-01-22T19:02:50.157Z", - "live_revision": null - } -}, -{ - "model": "wagtailcore.page", - "pk": 15, - "fields": { - "path": "0001000100020004", - "depth": 4, - "numchild": 3, - "title": "Partenaires", - "slug": "partenaires", - "content_type": [ - "cofcms", - "cofdirectorypage" - ], - "live": true, - "has_unpublished_changes": false, - "url_path": "/global/site/partenaires/", - "owner": [ - "root" - ], - "seo_title": "", - "show_in_menus": true, - "search_description": "", - "go_live_at": null, - "expire_at": null, - "expired": false, - "locked": false, - "first_published_at": "2018-01-22T18:59:44.708Z", - "last_published_at": "2018-01-28T16:19:18.663Z", - "latest_revision_created_at": "2018-01-28T16:19:18.663Z", - "live_revision": null - } -}, -{ - "model": "wagtailcore.page", - "pk": 16, - "fields": { - "path": "0001000100020005", - "depth": 4, - "numchild": 1, - "title": "Cours Particuliers", - "slug": "cours-particuliers", - "content_type": [ - "cofcms", - "cofpage" - ], - "live": true, - "has_unpublished_changes": false, - "url_path": "/global/site/cours-particuliers/", - "owner": [ - "root" - ], - "seo_title": "", - "show_in_menus": true, - "search_description": "", - "go_live_at": null, - "expire_at": null, - "expired": false, - "locked": false, - "first_published_at": "2018-01-22T19:00:35.984Z", - "last_published_at": "2018-01-22T19:02:23.524Z", - "latest_revision_created_at": "2018-01-22T19:02:23.524Z", - "live_revision": null - } -}, -{ - "model": "wagtailcore.page", - "pk": 17, - "fields": { - "path": "00010001000200010001", - "depth": 5, - "numchild": 0, - "title": "Singin' in the R'ENS", - "slug": "singin-in-the-rens", - "content_type": [ - "cofcms", - "cofactupage" - ], - "live": true, - "has_unpublished_changes": false, - "url_path": "/global/site/actualites/singin-in-the-rens/", - "owner": [ - "root" - ], - "seo_title": "", - "show_in_menus": false, - "search_description": "", - "go_live_at": null, - "expire_at": null, - "expired": false, - "locked": false, - "first_published_at": "2018-01-22T19:14:34.348Z", - "last_published_at": "2018-01-22T19:14:34.060Z", - "latest_revision_created_at": "2018-01-22T19:14:34.060Z", - "live_revision": null - } -}, -{ - "model": "wagtailcore.page", - "pk": 18, - "fields": { - "path": "00010001000200010002", - "depth": 5, - "numchild": 0, - "title": "Le Retour du Bur\u00f4", - "slug": "le-retour-du-bur\u00f4", - "content_type": [ - "cofcms", - "cofactupage" - ], - "live": true, - "has_unpublished_changes": false, - "url_path": "/global/site/actualites/le-retour-du-bur\u00f4/", - "owner": [ - "root" - ], - "seo_title": "", - "show_in_menus": false, - "search_description": "", - "go_live_at": null, - "expire_at": null, - "expired": false, - "locked": false, - "first_published_at": "2018-01-22T19:17:07.870Z", - "last_published_at": "2018-01-22T19:17:07.603Z", - "latest_revision_created_at": "2018-01-22T19:17:07.603Z", - "live_revision": null - } -}, -{ - "model": "wagtailcore.page", - "pk": 19, - "fields": { - "path": "00010001000200010003", - "depth": 5, - "numchild": 0, - "title": "\u00c9lection du Bur\u00f4 2018", - "slug": "\u00e9lection-du-bur\u00f4-2018", - "content_type": [ - "cofcms", - "cofactupage" - ], - "live": true, - "has_unpublished_changes": false, - "url_path": "/global/site/actualites/\u00e9lection-du-bur\u00f4-2018/", - "owner": [ - "root" - ], - "seo_title": "", - "show_in_menus": false, - "search_description": "", - "go_live_at": null, - "expire_at": null, - "expired": false, - "locked": false, - "first_published_at": "2018-01-22T19:22:34.232Z", - "last_published_at": "2018-01-22T19:22:33.946Z", - "latest_revision_created_at": "2018-01-22T19:22:33.946Z", - "live_revision": null - } -}, -{ - "model": "wagtailcore.page", - "pk": 20, - "fields": { - "path": "00010001000200030001", - "depth": 5, - "numchild": 0, - "title": "Arts Plastiques", - "slug": "arts-plastiques", - "content_type": [ - "cofcms", - "cofdirectoryentrypage" - ], - "live": true, - "has_unpublished_changes": false, - "url_path": "/global/site/clubs/arts-plastiques/", - "owner": [ - "root" - ], - "seo_title": "", - "show_in_menus": false, - "search_description": "", - "go_live_at": null, - "expire_at": null, - "expired": false, - "locked": false, - "first_published_at": "2018-01-22T20:12:40.652Z", - "last_published_at": "2018-01-22T20:12:40.395Z", - "latest_revision_created_at": "2018-01-22T20:12:40.395Z", - "live_revision": null - } -}, -{ - "model": "wagtailcore.page", - "pk": 21, - "fields": { - "path": "00010001000200030002", - "depth": 5, - "numchild": 0, - "title": "B\u00e9d\u00e9th\u00e8que", - "slug": "b\u00e9d\u00e9th\u00e8que", - "content_type": [ - "cofcms", - "cofdirectoryentrypage" - ], - "live": true, - "has_unpublished_changes": false, - "url_path": "/global/site/clubs/b\u00e9d\u00e9th\u00e8que/", - "owner": [ - "root" - ], - "seo_title": "", - "show_in_menus": false, - "search_description": "", - "go_live_at": null, - "expire_at": null, - "expired": false, - "locked": false, - "first_published_at": "2018-01-22T20:14:00.475Z", - "last_published_at": "2018-01-22T20:14:00.222Z", - "latest_revision_created_at": "2018-01-22T20:14:00.222Z", - "live_revision": null - } -}, -{ - "model": "wagtailcore.page", - "pk": 22, - "fields": { - "path": "00010001000200040001", - "depth": 5, - "numchild": 0, - "title": "MGEN", - "slug": "mgen", - "content_type": [ - "cofcms", - "cofdirectoryentrypage" - ], - "live": true, - "has_unpublished_changes": false, - "url_path": "/global/site/partenaires/mgen/", - "owner": [ - "root" - ], - "seo_title": "", - "show_in_menus": false, - "search_description": "", - "go_live_at": null, - "expire_at": null, - "expired": false, - "locked": false, - "first_published_at": "2018-01-22T20:20:46.919Z", - "last_published_at": "2018-01-22T20:20:46.667Z", - "latest_revision_created_at": "2018-01-22T20:20:46.667Z", - "live_revision": null - } -}, -{ - "model": "wagtailcore.page", - "pk": 23, - "fields": { - "path": "00010001000200040002", - "depth": 5, - "numchild": 0, - "title": "Soci\u00e9t\u00e9 G\u00e9n\u00e9rale", - "slug": "soci\u00e9t\u00e9-g\u00e9n\u00e9rale", - "content_type": [ - "cofcms", - "cofdirectoryentrypage" - ], - "live": true, - "has_unpublished_changes": false, - "url_path": "/global/site/partenaires/soci\u00e9t\u00e9-g\u00e9n\u00e9rale/", - "owner": [ - "root" - ], - "seo_title": "", - "show_in_menus": false, - "search_description": "", - "go_live_at": null, - "expire_at": null, - "expired": false, - "locked": false, - "first_published_at": "2018-01-22T20:21:19.043Z", - "last_published_at": "2018-01-22T20:21:18.752Z", - "latest_revision_created_at": "2018-01-22T20:21:18.752Z", - "live_revision": null - } -}, -{ - "model": "wagtailcore.page", - "pk": 24, - "fields": { - "path": "00010001000200040003", - "depth": 5, - "numchild": 0, - "title": "MAIF", - "slug": "maif", - "content_type": [ - "cofcms", - "cofdirectoryentrypage" - ], - "live": true, - "has_unpublished_changes": false, - "url_path": "/global/site/partenaires/maif/", - "owner": [ - "root" - ], - "seo_title": "", - "show_in_menus": false, - "search_description": "", - "go_live_at": null, - "expire_at": null, - "expired": false, - "locked": false, - "first_published_at": "2018-01-28T16:20:33.653Z", - "last_published_at": "2018-01-28T16:20:33.392Z", - "latest_revision_created_at": "2018-01-28T16:20:33.392Z", - "live_revision": null - } -}, -{ - "model": "wagtailcore.page", - "pk": 25, - "fields": { - "path": "0001000100020006", - "depth": 4, - "numchild": 0, - "title": "Ne pas supprimer", - "slug": "utils", - "content_type": [ - "cofcms", - "cofutilpage" - ], - "live": true, - "has_unpublished_changes": false, - "url_path": "", - "owner": [ - "root" - ], - "seo_title": "", - "show_in_menus": false, - "search_description": "", - "go_live_at": null, - "expire_at": null, - "expired": false, - "locked": false, - "first_published_at": "2018-01-28T21:16:04.989Z", - "last_published_at": "2018-01-28T21:16:19.180Z", - "latest_revision_created_at": "2018-01-28T21:16:18.887Z", - "live_revision": null - } -}, -{ - "model": "wagtailcore.page", - "pk": 26, - "fields": { - "path": "00010001000200050001", - "depth": 5, - "numchild": 0, - "title": "Demande de petit cours", - "slug": "demande-de-petit-cours", - "content_type": [ - "cofcms", - "cofpage" - ], - "live": true, - "has_unpublished_changes": false, - "url_path": "/global/site/cours-particuliers/demande-de-petit-cours/", - "owner": [ - "root" - ], - "seo_title": "", - "show_in_menus": false, - "search_description": "", - "go_live_at": null, - "expire_at": null, - "expired": false, - "locked": false, - "first_published_at": "2018-03-21T19:54:20.527Z", - "last_published_at": "2018-03-21T19:54:20.527Z", - "latest_revision_created_at": "2018-03-21T19:54:20.302Z", - "live_revision": null - } -}, -{ - "model": "wagtailcore.collection", - "pk": 3, - "fields": { - "path": "00010002", - "depth": 2, - "numchild": 0, - "name": "COF" - } -}, -{ - "model": "wagtailimages.image", - "pk": 33, - "fields": { - "collection": 3, - "title": "COF-17", - "file": "original_images/cof-768x576.jpg", - "width": 768, - "height": 576, - "created_at": "2018-01-22T18:49:25.647Z", - "uploaded_by_user": [ - "root" - ], - "focal_point_x": null, - "focal_point_y": null, - "focal_point_width": null, - "focal_point_height": null, - "file_size": 132330 - } -}, -{ - "model": "wagtailimages.image", - "pk": 34, - "fields": { - "collection": 3, - "title": "Singin in the RENS", - "file": "original_images/singin.jpg", - "width": 682, - "height": 361, - "created_at": "2018-01-22T19:13:49.753Z", - "uploaded_by_user": [ - "root" - ], - "focal_point_x": null, - "focal_point_y": null, - "focal_point_width": null, - "focal_point_height": null, - "file_size": null - } -}, -{ - "model": "wagtailimages.image", - "pk": 35, - "fields": { - "collection": 3, - "title": "Retour du Bur\u00f4", - "file": "original_images/retour.jpg", - "width": 614, - "height": 211, - "created_at": "2018-01-22T19:16:25.375Z", - "uploaded_by_user": [ - "root" - ], - "focal_point_x": null, - "focal_point_y": null, - "focal_point_width": null, - "focal_point_height": null, - "file_size": null - } -}, -{ - "model": "wagtailimages.image", - "pk": 36, - "fields": { - "collection": 3, - "title": "elections 18", - "file": "original_images/elections.png", - "width": 850, - "height": 406, - "created_at": "2018-01-22T19:21:31.954Z", - "uploaded_by_user": [ - "root" - ], - "focal_point_x": null, - "focal_point_y": null, - "focal_point_width": null, - "focal_point_height": null, - "file_size": null - } -}, -{ - "model": "wagtailimages.image", - "pk": 37, - "fields": { - "collection": 3, - "title": "Arts Plastiques", - "file": "original_images/ArtsPla.png", - "width": 150, - "height": 150, - "created_at": "2018-01-22T20:11:56.461Z", - "uploaded_by_user": [ - "root" - ], - "focal_point_x": null, - "focal_point_y": null, - "focal_point_width": null, - "focal_point_height": null, - "file_size": null - } -}, -{ - "model": "wagtailimages.image", - "pk": 38, - "fields": { - "collection": 3, - "title": "MGEN", - "file": "original_images/MGEN.jpg", - "width": 300, - "height": 204, - "created_at": "2018-01-22T20:20:41.712Z", - "uploaded_by_user": [ - "root" - ], - "focal_point_x": null, - "focal_point_y": null, - "focal_point_width": null, - "focal_point_height": null, - "file_size": null - } -}, -{ - "model": "wagtailimages.image", - "pk": 39, - "fields": { - "collection": 3, - "title": "MAIF", - "file": "original_images/Logo-MAIF.gif", - "width": 300, - "height": 290, - "created_at": "2018-01-28T16:20:13.828Z", - "uploaded_by_user": [ - "root" - ], - "focal_point_x": null, - "focal_point_y": null, - "focal_point_width": null, - "focal_point_height": null, - "file_size": null - } -}, -{ - "model": "wagtailmenus.mainmenu", - "pk": 1, - "fields": { - "site": [ - "localhost", - 8000 - ], - "max_levels": 2, - "use_specific": 1 - } -}, -{ - "model": "wagtailmenus.flatmenu", - "pk": 2, - "fields": { - "site": [ - "localhost", - 8000 - ], - "title": "COF - liens externes", - "handle": "cof-nav-ext", - "heading": "", - "max_levels": 1, - "use_specific": 1 - } -}, -{ - "model": "wagtailmenus.flatmenu", - "pk": 3, - "fields": { - "site": [ - "localhost", - 8000 - ], - "title": "COF - liens internes", - "handle": "cof-nav-int", - "heading": "", - "max_levels": 1, - "use_specific": 1 - } -}, -{ - "model": "wagtailmenus.flatmenuitem", - "pk": 7, - "fields": { - "sort_order": 0, - "link_page": null, - "link_url": "https://www.cof.ens.fr/bda/", - "link_text": "BdA", - "handle": "", - "url_append": "", - "allow_subnav": false, - "menu": 2 - } -}, -{ - "model": "wagtailmenus.flatmenuitem", - "pk": 8, - "fields": { - "sort_order": 1, - "link_page": null, - "link_url": "https://www.cof.ens.fr/bds/", - "link_text": "BdS", - "handle": "", - "url_append": "", - "allow_subnav": false, - "menu": 2 - } -}, -{ - "model": "wagtailmenus.flatmenuitem", - "pk": 9, - "fields": { - "sort_order": 2, - "link_page": null, - "link_url": "https://www.cof.ens.fr/gestion", - "link_text": "GestioCOF", - "handle": "", - "url_append": "", - "allow_subnav": false, - "menu": 2 - } -}, -{ - "model": "wagtailmenus.flatmenuitem", - "pk": 10, - "fields": { - "sort_order": 3, - "link_page": null, - "link_url": "https://www.cof.ens.fr/bocal", - "link_text": "Le BOcal", - "handle": "", - "url_append": "", - "allow_subnav": false, - "menu": 2 - } -}, -{ - "model": "wagtailmenus.flatmenuitem", - "pk": 11, - "fields": { - "sort_order": 4, - "link_page": null, - "link_url": "https://photos.cof.ens.fr/", - "link_text": "Serveur photos", - "handle": "", - "url_append": "", - "allow_subnav": false, - "menu": 2 - } -}, -{ - "model": "wagtailmenus.flatmenuitem", - "pk": 12, - "fields": { - "sort_order": 5, - "link_page": null, - "link_url": "https://www.eleves.ens.fr", - "link_text": "Services élèves ENS", - "handle": "", - "url_append": "", - "allow_subnav": false, - "menu": 2 - } -}, -{ - "model": "wagtailmenus.flatmenuitem", - "pk": 13, - "fields": { - "sort_order": 0, - "link_page": 13, - "link_url": null, - "link_text": "", - "handle": "", - "url_append": "", - "allow_subnav": false, - "menu": 3 - } -}, -{ - "model": "wagtailmenus.flatmenuitem", - "pk": 14, - "fields": { - "sort_order": 1, - "link_page": 12, - "link_url": null, - "link_text": "", - "handle": "", - "url_append": "", - "allow_subnav": false, - "menu": 3 - } -}, -{ - "model": "wagtailmenus.flatmenuitem", - "pk": 15, - "fields": { - "sort_order": 2, - "link_page": 14, - "link_url": null, - "link_text": "", - "handle": "", - "url_append": "", - "allow_subnav": false, - "menu": 3 - } -}, -{ - "model": "wagtailmenus.flatmenuitem", - "pk": 16, - "fields": { - "sort_order": 3, - "link_page": 15, - "link_url": null, - "link_text": "", - "handle": "", - "url_append": "", - "allow_subnav": false, - "menu": 3 - } -}, -{ - "model": "wagtailmenus.flatmenuitem", - "pk": 17, - "fields": { - "sort_order": 4, - "link_page": 16, - "link_url": null, - "link_text": "", - "handle": "", - "url_append": "", - "allow_subnav": false, - "menu": 3 - } -}, -{ - "model": "cofcms.cofrootpage", - "pk": 11, - "fields": { - "title_fr": "Site du COF", - "title_en": "COF's website", - "slug_fr": "site", - "slug_en": null, - "url_path_fr": "/global/site/", - "url_path_en": "/global/site/", - "seo_title_fr": "Accueil", - "seo_title_en": "Home", - "search_description_fr": "", - "search_description_en": "", - "introduction": "

Bienvenue sur le site du COF

", - "introduction_fr": "

Bienvenue sur le site du COF

", - "introduction_en": "

Welcome to the COF's website

" - } -}, -{ - "model": "cofcms.cofpage", - "pk": 13, - "fields": { - "title_fr": "Pr\u00e9sentation", - "title_en": "Presentation", - "slug_fr": "pr\u00e9sentation", - "slug_en": "presentation", - "url_path_fr": "/global/site/pr\u00e9sentation/", - "url_path_en": "/global/site/presentation/", - "seo_title_fr": null, - "seo_title_en": null, - "search_description_fr": "", - "search_description_en": "", - "body": "[{\"id\": \"344a0786-f540-4d77-bbf5-59ab96bb529b\", \"value\": \"Quoi ?\", \"type\": \"heading\"}, {\"id\": \"6f46dd11-a7a8-4491-9b98-7adc56a75e42\", \"value\": \"

Le COF (Comit\\u00e9 d\\u2019Organisation des F\\u00eates), c\\u2019est le petit nom de \\nl\\u2019AEENS, l\\u2019Association des \\u00c9l\\u00e8ves de l\\u2019ENS (association de loi 1901). \\nC\\u2019est lui qui organise les\\u00a0\\u00e9v\\u00e8nements\\u00a0culturels, associatifs et bien s\\u00fbr\\n festifs, de l\\u2019\\u00c9cole normale.

\\n

Ses principales responsabilit\\u00e9s sont entre autres :

\\n\\n

Il est bien s\\u00fbr tr\\u00e8s li\\u00e9 au BDS (Bureau des Sports) avec qui il pr\\u00e9pare les InterENS sportives, mais qui est\\u00a0n\\u00e9anmoins\\u00a0une entit\\u00e9 distincte du COF.

\", \"type\": \"paragraph\"}, {\"id\": \"c02ba930-48ab-4f1f-8e3a-e8edeed1346d\", \"value\": \"Qui ?\", \"type\": \"heading\"}, {\"id\": \"6a1db5e4-06b3-44ae-bef1-2be9b049dc35\", \"value\": \"

Le COF c\\u2019est avant tout ses membres (environ 700 chaque ann\\u00e9e) et ses\\n clubs (entre 20 et 40 selon les ann\\u00e9es). Chaque club est g\\u00e9r\\u00e9 par un \\nresponsable (voir les pages des clubs).

\\n

Comme dans toute association il y a un bureau \\u2013 compos\\u00e9 de 12 personnes r\\u00e9\\u00e9lues tous les 6 mois.

\\n

Le COF organise au moins 3 Assembl\\u00e9es G\\u00e9n\\u00e9rales par an, une en \\noctobre pour attribuer les budgets annuels, une en f\\u00e9vrier pour \\nr\\u00e9ajuster les budgets, discuter des projets, des affaires courantes ; et\\n la derni\\u00e8re en juin pour faire un bilan de l\\u2019ann\\u00e9e, voter les \\ncotisations et les partenariats. C\\u2019est l\\u2019occasion pour tous les membres \\nde se rassembler et de faire entendre leur voix, pour les clubs de se \\npr\\u00e9senter et pour le Bur\\u00f4\\u2026 et de vous rendre des comptes ! Il y en a \\naussi une avant chaque \\u00e9lection afin d\\u2019\\u00e9couter la pr\\u00e9sentation des \\ncandidats au Bur\\u00f4.

\", \"type\": \"paragraph\"}, {\"id\": \"224a0c75-eb3c-4088-9091-cb1178e6f550\", \"value\": 33, \"type\": \"image\"}, {\"id\": \"0213e74b-321a-4357-a5f5-47aca37df908\", \"value\": \"Poste / Nom\\n\\n\\n\\n\\n\\t
Pr\\u00e9sident : Valentin Cocco
Vice-pr\\u00e9sident : Th\\u00e9o Mathevet
Tr\\u00e9sorier : Mathias Penot\\n\\n\\n\\t
Sous-tr\\u00e9sorier : Octave Tessiot
Secr\\u00e9taire : L\\u00e9na Gurriaran
Charg\\u00e9 de comm' : Cl\\u00e9ment de Mecquenem
Charg\\u00e9 de comm' adjoint : Charles Giroudot
Pr\\u00e9sidente du Bureau des Arts : Caroline Delattre
Bureau des Arts : Bryan Rimbault
Bureau des Arts : Philippe Danr\\u00e9
Bureau des Arts : Louise Garrigou
Bureau des Arts : Emile Laymand

Bureau des Arts : Cl\\u00e9mence Elmira

\", \"type\": \"paragraph\"}, {\"id\": \"7c37c61e-cff5-4b6b-9b5f-8c54120a9c75\", \"value\": \"O\\u00f9 ?\", \"type\": \"heading\"}, {\"id\": \"61a65072-1eb2-4f99-bad1-045c03594318\", \"value\": \"

Le COF dispose d\\u2019un local dans l\\u2019\\u00e9cole, au 45 rue d\\u2019Ulm. Il suffit de\\n traverser la cour aux Ernest puis de tourner tout de suite \\u00e0 gauche.

\", \"type\": \"paragraph\"}, {\"id\": \"3d399310-d415-47be-b9c6-7b01a4a3ffd3\", \"value\": \"Quand ?\", \"type\": \"heading\"}, {\"id\": \"c7bdee8c-6833-47a2-b4f0-ac9a21c6cf90\", \"value\": \"

Le COF assure deux permanences tous les jours (sauf samedi et dimanche) : une de 12h \\u00e0 14h, et une de 18h \\u00e0 20h.

\", \"type\": \"paragraph\"}, {\"id\": \"53358653-c518-4120-925a-5e314f064cf2\", \"value\": \"Des questions ?\", \"type\": \"heading\"}, {\"id\": \"6e6ac1b2-9eaf-44cd-a6f0-1c497148ee84\", \"value\": \"

Vous pouvez nous contacter facilement !

\\n\", \"type\": \"paragraph\"}]", - "body_fr": "[{\"id\": \"344a0786-f540-4d77-bbf5-59ab96bb529b\", \"value\": \"Quoi ?\", \"type\": \"heading\"}, {\"id\": \"6f46dd11-a7a8-4491-9b98-7adc56a75e42\", \"value\": \"

Le COF (Comit\\u00e9 d\\u2019Organisation des F\\u00eates), c\\u2019est le petit nom de \\nl\\u2019AEENS, l\\u2019Association des \\u00c9l\\u00e8ves de l\\u2019ENS (association de loi 1901). \\nC\\u2019est lui qui organise les\\u00a0\\u00e9v\\u00e8nements\\u00a0culturels, associatifs et bien s\\u00fbr\\n festifs, de l\\u2019\\u00c9cole normale.

\\n

Ses principales responsabilit\\u00e9s sont entre autres :

\\n\\n

Il est bien s\\u00fbr tr\\u00e8s li\\u00e9 au BDS (Bureau des Sports) avec qui il pr\\u00e9pare les InterENS sportives, mais qui est\\u00a0n\\u00e9anmoins\\u00a0une entit\\u00e9 distincte du COF.

\", \"type\": \"paragraph\"}, {\"id\": \"c02ba930-48ab-4f1f-8e3a-e8edeed1346d\", \"value\": \"Qui ?\", \"type\": \"heading\"}, {\"id\": \"6a1db5e4-06b3-44ae-bef1-2be9b049dc35\", \"value\": \"

Le COF c\\u2019est avant tout ses membres (environ 700 chaque ann\\u00e9e) et ses\\n clubs (entre 20 et 40 selon les ann\\u00e9es). Chaque club est g\\u00e9r\\u00e9 par un \\nresponsable (voir les pages des clubs).

\\n

Comme dans toute association il y a un bureau \\u2013 compos\\u00e9 de 12 personnes r\\u00e9\\u00e9lues tous les 6 mois.

\\n

Le COF organise au moins 3 Assembl\\u00e9es G\\u00e9n\\u00e9rales par an, une en \\noctobre pour attribuer les budgets annuels, une en f\\u00e9vrier pour \\nr\\u00e9ajuster les budgets, discuter des projets, des affaires courantes ; et\\n la derni\\u00e8re en juin pour faire un bilan de l\\u2019ann\\u00e9e, voter les \\ncotisations et les partenariats. C\\u2019est l\\u2019occasion pour tous les membres \\nde se rassembler et de faire entendre leur voix, pour les clubs de se \\npr\\u00e9senter et pour le Bur\\u00f4\\u2026 et de vous rendre des comptes ! Il y en a \\naussi une avant chaque \\u00e9lection afin d\\u2019\\u00e9couter la pr\\u00e9sentation des \\ncandidats au Bur\\u00f4.

\", \"type\": \"paragraph\"}, {\"id\": \"224a0c75-eb3c-4088-9091-cb1178e6f550\", \"value\": 33, \"type\": \"image\"}, {\"id\": \"0213e74b-321a-4357-a5f5-47aca37df908\", \"value\": \"Poste / Nom\\n\\n\\n\\n\\n\\t
Pr\\u00e9sident : Valentin Cocco
Vice-pr\\u00e9sident : Th\\u00e9o Mathevet
Tr\\u00e9sorier : Mathias Penot\\n\\n\\n\\t
Sous-tr\\u00e9sorier : Octave Tessiot
Secr\\u00e9taire : L\\u00e9na Gurriaran
Charg\\u00e9 de comm' : Cl\\u00e9ment de Mecquenem
Charg\\u00e9 de comm' adjoint : Charles Giroudot
Pr\\u00e9sidente du Bureau des Arts : Caroline Delattre
Bureau des Arts : Bryan Rimbault
Bureau des Arts : Philippe Danr\\u00e9
Bureau des Arts : Louise Garrigou
Bureau des Arts : Emile Laymand

Bureau des Arts : Cl\\u00e9mence Elmira

\", \"type\": \"paragraph\"}, {\"id\": \"7c37c61e-cff5-4b6b-9b5f-8c54120a9c75\", \"value\": \"O\\u00f9 ?\", \"type\": \"heading\"}, {\"id\": \"61a65072-1eb2-4f99-bad1-045c03594318\", \"value\": \"

Le COF dispose d\\u2019un local dans l\\u2019\\u00e9cole, au 45 rue d\\u2019Ulm. Il suffit de\\n traverser la cour aux Ernest puis de tourner tout de suite \\u00e0 gauche.

\", \"type\": \"paragraph\"}, {\"id\": \"3d399310-d415-47be-b9c6-7b01a4a3ffd3\", \"value\": \"Quand ?\", \"type\": \"heading\"}, {\"id\": \"c7bdee8c-6833-47a2-b4f0-ac9a21c6cf90\", \"value\": \"

Le COF assure deux permanences tous les jours (sauf samedi et dimanche) : une de 12h \\u00e0 14h, et une de 18h \\u00e0 20h.

\", \"type\": \"paragraph\"}, {\"id\": \"53358653-c518-4120-925a-5e314f064cf2\", \"value\": \"Des questions ?\", \"type\": \"heading\"}, {\"id\": \"6e6ac1b2-9eaf-44cd-a6f0-1c497148ee84\", \"value\": \"

Vous pouvez nous contacter facilement !

\\n\", \"type\": \"paragraph\"}]", - "body_en": "[]" - } -}, -{ - "model": "cofcms.cofpage", - "pk": 16, - "fields": { - "title_fr": "Cours Particuliers", - "title_en": null, - "slug_fr": "cours-particuliers", - "slug_en": null, - "url_path_fr": "/global/site/cours-particuliers/", - "url_path_en": "/global/site/cours-particuliers/", - "seo_title_fr": null, - "seo_title_en": null, - "search_description_fr": "", - "search_description_en": "", - "body": "[{\"id\": \"dbf9f940-51a6-43d1-89ff-1bf0648cead8\", \"value\": \"

Les \\u00e9l\\u00e8ves de l'ENS peuvent donner des cours particuliers. Si vous \\n\\u00eates int\\u00e9ress\\u00e9 pour en prendre, merci de faire une demande de petits \\ncours sur cette page.

\\n \\n \\n\\t\\n\\t
\\n\\tSi vous \\u00eates \\u00e9l\\u00e8ve de l'\\u00e9cole, vous pouvez g\\u00e9rer vos petits cours sur GestioCOF.\", \"type\": \"paragraph\"}]", - "body_fr": "[{\"id\": \"dbf9f940-51a6-43d1-89ff-1bf0648cead8\", \"value\": \"

Les \\u00e9l\\u00e8ves de l'ENS peuvent donner des cours particuliers. Si vous \\n\\u00eates int\\u00e9ress\\u00e9 pour en prendre, merci de faire une demande de petits \\ncours sur cette page.

\\n \\n \\n\\t\\n\\t
\\n\\tSi vous \\u00eates \\u00e9l\\u00e8ve de l'\\u00e9cole, vous pouvez g\\u00e9rer vos petits cours sur GestioCOF.\", \"type\": \"paragraph\"}]", - "body_en": "[]" - } -}, -{ - "model": "cofcms.cofpage", - "pk": 26, - "fields": { - "title_fr": "Demande de petit cours", - "title_en": null, - "slug_fr": "demande-de-petit-cours", - "slug_en": null, - "url_path_fr": "/global/site/cours-particuliers/demande-de-petit-cours/", - "url_path_en": "/global/site/cours-particuliers/demande-de-petit-cours/", - "seo_title_fr": null, - "seo_title_en": null, - "search_description_fr": "", - "search_description_en": "", - "body": "[{\"value\": {\"url\": \"https://www.cof.ens.fr/gestion/petitcours/demande-raw\", \"height\": \"1050\"}, \"id\": \"397ff222-6c1b-4e5c-a971-a50621dd83b3\", \"type\": \"iframe\"}]", - "body_fr": "[{\"value\": {\"url\": \"https://www.cof.ens.fr/gestion/petitcours/demande-raw\", \"height\": \"1050\"}, \"id\": \"397ff222-6c1b-4e5c-a971-a50621dd83b3\", \"type\": \"iframe\"}]", - "body_en": "[]" - } -}, -{ - "model": "cofcms.cofactuindexpage", - "pk": 12, - "fields": { - "title_fr": "Actualit\u00e9s", - "title_en": "News", - "slug_fr": "actualites", - "slug_en": "news", - "url_path_fr": "/global/site/actualites/", - "url_path_en": "/global/site/news/", - "seo_title_fr": null, - "seo_title_en": null, - "search_description_fr": "", - "search_description_en": "" - } -}, -{ - "model": "cofcms.cofactupage", - "pk": 17, - "fields": { - "title_fr": "Singin' in the R'ENS", - "title_en": null, - "slug_fr": "singin-in-the-rens", - "slug_en": null, - "url_path_fr": "/global/site/actualites/singin-in-the-rens/", - "url_path_en": "/global/site/news/singin-in-the-rens/", - "seo_title_fr": null, - "seo_title_en": null, - "search_description_fr": "", - "search_description_en": "", - "chapo": "Soir\u00e9e com\u00e9die musicale", - "chapo_fr": "Soir\u00e9e com\u00e9die musicale", - "chapo_en": "", - "body": "Je chante dans l'ENS
Je chante dans l'ENS
Cette glorieuse soir\u00e9e
Me rendra le sourire
Je tournoie sur la piste
Lumi\u00e8re noire au plafond
Vibrations dans mon coeur
Et j'suis pr\u00eat\u00b7e \u00e0 chanter
Que la foule endiabl\u00e9e
Chasse tous mes tracassins
Viens \u00e0 notre soir\u00e9e
On va bien s'amuser
Oui descends en K-F\u00eat
Avec le sourire aux l\u00e8vres
Et puis chante
Chante dans l'ENS !

\n Une ambiance de com\u00e9die musicale, de la danse, du chant, et beaucoup de\n bonne humeur : venez nombreux\u00b7ses jeudi 25 janvier pour notre soir\u00e9e \nSingin' in the R'ENS, qui aura lieu en K-F\u00eat d\u00e8s 23h !

", - "body_fr": "Je chante dans l'ENS
Je chante dans l'ENS
Cette glorieuse soir\u00e9e
Me rendra le sourire
Je tournoie sur la piste
Lumi\u00e8re noire au plafond
Vibrations dans mon coeur
Et j'suis pr\u00eat\u00b7e \u00e0 chanter
Que la foule endiabl\u00e9e
Chasse tous mes tracassins
Viens \u00e0 notre soir\u00e9e
On va bien s'amuser
Oui descends en K-F\u00eat
Avec le sourire aux l\u00e8vres
Et puis chante
Chante dans l'ENS !

\n Une ambiance de com\u00e9die musicale, de la danse, du chant, et beaucoup de\n bonne humeur : venez nombreux\u00b7ses jeudi 25 janvier pour notre soir\u00e9e \nSingin' in the R'ENS, qui aura lieu en K-F\u00eat d\u00e8s 23h !

", - "body_en": "", - "image": 34, - "is_event": true, - "date_start": "2018-01-25T21:00:00Z", - "date_end": null, - "all_day": false - } -}, -{ - "model": "cofcms.cofactupage", - "pk": 18, - "fields": { - "title_fr": "Le Retour du Bur\u00f4", - "title_en": null, - "slug_fr": "le-retour-du-bur\u00f4", - "slug_en": null, - "url_path_fr": "/global/site/actualites/le-retour-du-bur\u00f4/", - "url_path_en": "/global/site/news/le-retour-du-bur\u00f4/", - "seo_title_fr": null, - "seo_title_en": null, - "search_description_fr": "", - "search_description_en": "", - "chapo": "Premi\u00e8re soir\u00e9e du nouveau COF", - "chapo_fr": "Premi\u00e8re soir\u00e9e du nouveau COF", - "chapo_en": "", - "body": "Le Retour du \nBur\u00f4, qu'est-ce que c'est donc ? La premi\u00e8re soir\u00e9e du nouveau COF pardi\n ! Le th\u00e8me ? Top : je suis une saga cin\u00e9matographique \u00e0 grand succ\u00e8s, \nje compte actuellement huit \u00e9pisodes (et demi) \u00e0 mon actif, j'ai fait \nr\u00eaver des g\u00e9n\u00e9rations enti\u00e8res depuis 1977, m\u00eame sans m'avoir vu vous me\n connaissez sans doute pour une c\u00e9l\u00e8bre r\u00e9plique, je suis, je suis... Je\n suis ton p\u00e8re ! Hum hum, je suis : Star Wars !
Au programme, bracelets-lasers, \u00e9toiles dans les yeux, et voyage musical interstellaire.

Rendez-vous jeudi 18 janvier en K-F\u00eat, \u00e0 partir de 22h ! Venez du COFt\u00e9 obscur, on a des cookies !

", - "body_fr": "Le Retour du \nBur\u00f4, qu'est-ce que c'est donc ? La premi\u00e8re soir\u00e9e du nouveau COF pardi\n ! Le th\u00e8me ? Top : je suis une saga cin\u00e9matographique \u00e0 grand succ\u00e8s, \nje compte actuellement huit \u00e9pisodes (et demi) \u00e0 mon actif, j'ai fait \nr\u00eaver des g\u00e9n\u00e9rations enti\u00e8res depuis 1977, m\u00eame sans m'avoir vu vous me\n connaissez sans doute pour une c\u00e9l\u00e8bre r\u00e9plique, je suis, je suis... Je\n suis ton p\u00e8re ! Hum hum, je suis : Star Wars !
Au programme, bracelets-lasers, \u00e9toiles dans les yeux, et voyage musical interstellaire.

Rendez-vous jeudi 18 janvier en K-F\u00eat, \u00e0 partir de 22h ! Venez du COFt\u00e9 obscur, on a des cookies !

", - "body_en": "", - "image": 35, - "is_event": true, - "date_start": "2018-01-18T21:00:00Z", - "date_end": null, - "all_day": false - } -}, -{ - "model": "cofcms.cofactupage", - "pk": 19, - "fields": { - "title_fr": "\u00c9lection du Bur\u00f4 2018", - "title_en": null, - "slug_fr": "\u00e9lection-du-bur\u00f4-2018", - "slug_en": null, - "url_path_fr": "/global/site/actualites/\u00e9lection-du-bur\u00f4-2018/", - "url_path_en": "/global/site/news/\u00e9lection-du-bur\u00f4-2018/", - "seo_title_fr": null, - "seo_title_en": null, - "search_description_fr": "", - "search_description_en": "", - "chapo": "", - "chapo_fr": "", - "chapo_en": "", - "body": "Les campagnes battent leurs pleins rythm\u00e9es par de nombreux petits \nd\u00e9jeuners, soir\u00e9es et autres \u00e9v\u00e9nements organis\u00e9s par les diff\u00e9rentes \nlistes et ces deux semaines se finiront par l\u2019\u00e9lection du nouveau Bur\u00f4.\n

\u00a0

\n

\u00a0

\n

Passez donc en aquarium pour le premier tour des \u00e9lections du Bur\u00f4 du\n COF 2018 ! Si vous ne pouvez pas venir en personne, un vote \n\u00e9lectronique sera mis en place !

", - "body_fr": "Les campagnes battent leurs pleins rythm\u00e9es par de nombreux petits \nd\u00e9jeuners, soir\u00e9es et autres \u00e9v\u00e9nements organis\u00e9s par les diff\u00e9rentes \nlistes et ces deux semaines se finiront par l\u2019\u00e9lection du nouveau Bur\u00f4.\n

\u00a0

\n

\u00a0

\n

Passez donc en aquarium pour le premier tour des \u00e9lections du Bur\u00f4 du\n COF 2018 ! Si vous ne pouvez pas venir en personne, un vote \n\u00e9lectronique sera mis en place !

", - "body_en": "", - "image": 36, - "is_event": false, - "date_start": "2017-12-18T19:22:00Z", - "date_end": "2018-01-25T19:22:00Z", - "all_day": true - } -}, -{ - "model": "cofcms.cofdirectorypage", - "pk": 14, - "fields": { - "title_fr": "Clubs", - "title_en": null, - "slug_fr": "clubs", - "slug_en": null, - "url_path_fr": "/global/site/clubs/", - "url_path_en": "/global/site/clubs/", - "seo_title_fr": null, - "seo_title_en": null, - "search_description_fr": "", - "search_description_en": "", - "introduction": "
\nVoici tous les clubs du COF !\n

La plupart de ces clubs ont des mailing lists, auxquelles il est souvent possible de s\u2019inscrire via le serveur mail sympa.

", - "introduction_fr": "
\nVoici tous les clubs du COF !\n

La plupart de ces clubs ont des mailing lists, auxquelles il est souvent possible de s\u2019inscrire via le serveur mail sympa.

", - "introduction_en": "", - "alphabetique": true - } -}, -{ - "model": "cofcms.cofdirectorypage", - "pk": 15, - "fields": { - "title_fr": "Partenaires", - "title_en": null, - "slug_fr": "partenaires", - "slug_en": null, - "url_path_fr": "/global/site/partenaires/", - "url_path_en": "/global/site/partenaires/", - "seo_title_fr": null, - "seo_title_en": null, - "search_description_fr": "", - "search_description_en": "", - "introduction": "

Le COF a n\u00e9goci\u00e9 pour vous de nombreux partenariats ! Bien s\u00fbr, il faut \u00eatre membre du COF pour en b\u00e9n\u00e9ficier.

", - "introduction_fr": "

Le COF a n\u00e9goci\u00e9 pour vous de nombreux partenariats ! Bien s\u00fbr, il faut \u00eatre membre du COF pour en b\u00e9n\u00e9ficier.

", - "introduction_en": "", - "alphabetique": false - } -}, -{ - "model": "cofcms.cofdirectoryentrypage", - "pk": 20, - "fields": { - "title_fr": "Arts Plastiques", - "title_en": null, - "slug_fr": "arts-plastiques", - "slug_en": null, - "url_path_fr": "/global/site/clubs/arts-plastiques/", - "url_path_en": "/global/site/clubs/arts-plastiques/", - "seo_title_fr": null, - "seo_title_en": null, - "search_description_fr": "", - "search_description_en": "", - "body": "Le club Arts Plastiques te propose un lieu de rencontre entre \npersonnes int\u00e9ress\u00e9es par les arts plastiques, le dessin ou la peinture.
\nMais, que faisons-nous au club Arts Plastiques ? D\u2019abord, des s\u00e9ances \nd\u2019initiation; et puis des s\u00e9ances \u00e0 th\u00e8me, avec des intervenants; des \nprojets communs; des sorties croquis\u2026

\nQue tu n\u2019aies jamais touch\u00e9 \u00e0 un pinceau, ou que tu sois d\u00e9j\u00e0 un-e grand-e artiste, n\u2019h\u00e9site pas \u00e0 venir nous rejoindre !

", - "body_fr": "Le club Arts Plastiques te propose un lieu de rencontre entre \npersonnes int\u00e9ress\u00e9es par les arts plastiques, le dessin ou la peinture.
\nMais, que faisons-nous au club Arts Plastiques ? D\u2019abord, des s\u00e9ances \nd\u2019initiation; et puis des s\u00e9ances \u00e0 th\u00e8me, avec des intervenants; des \nprojets communs; des sorties croquis\u2026

\nQue tu n\u2019aies jamais touch\u00e9 \u00e0 un pinceau, ou que tu sois d\u00e9j\u00e0 un-e grand-e artiste, n\u2019h\u00e9site pas \u00e0 venir nous rejoindre !

", - "body_en": "", - "links": "[{\"id\": \"8988ae9e-7b34-4d76-957b-04892697ff98\", \"value\": {\"texte\": \"Mailing-liste\", \"email\": \"artsplastiques@ens.fr\"}, \"type\": \"contact\"}]", - "links_fr": "[{\"id\": \"8988ae9e-7b34-4d76-957b-04892697ff98\", \"value\": {\"texte\": \"Mailing-liste\", \"email\": \"artsplastiques@ens.fr\"}, \"type\": \"contact\"}]", - "links_en": "[]", - "image": 37 - } -}, -{ - "model": "cofcms.cofdirectoryentrypage", - "pk": 21, - "fields": { - "title_fr": "B\u00e9d\u00e9th\u00e8que", - "title_en": null, - "slug_fr": "b\u00e9d\u00e9th\u00e8que", - "slug_en": null, - "url_path_fr": "/global/site/clubs/b\u00e9d\u00e9th\u00e8que/", - "url_path_en": "/global/site/clubs/b\u00e9d\u00e9th\u00e8que/", - "seo_title_fr": null, - "seo_title_en": null, - "search_description_fr": "", - "search_description_en": "", - "body": "De Riad Sattouf \u00e0 Katsuhiro Otomo, en passant par Andr\u00e9 Franquin, \nJacques Tardi, Didier Tarquin et Georges Wolinski, la BDth\u00e8que poss\u00e8de \nune collection de quatre mille bandes dessin\u00e9es sur une cinquantaine \nd\u2019\u00e9tag\u00e8res, en constante croissance. Class\u00e9es par dessinateur et \ncatalogu\u00e9es, toutes ces oeuvres offrent un large panorama du XXe si\u00e8cle \net sont librement consultables sur place sans mod\u00e9ration ! \u00c0 cela \ns\u2019ajoutent des milliers de p\u00e9riodiques sp\u00e9cialis\u00e9s datant de l\u2019\u00e2ge d\u2019or \nde la BD franco-belge, un Enfer cach\u00e9, et quelques conseils de lecture \n\u00e9crits par des fans.

\nLe club organise ausis des \u00e9v\u00e9nements divers par exemple un s\u00e9minaire \nsur la bande dessin\u00e9e, qui ne demande qu\u2019\u00e0 \u00eatre relanc\u00e9. \u00c0 l\u2019ordre du \njour, la mise en place d\u2019une exp\u00e9dition \u00e0 Angoul\u00eame avec le BDA en \njanvier 2017 pourrait m\u00eame se faire avec ton aide. Tous les \ndons et suggestions d\u2019achats sont les bienvenus. Pour participer aux \nd\u00e9cisions d\u2019achats, \u00e9crire des suggesions de lecture dans le BOcal, \nchoisir les bandes dessin\u00e9es \u00e0 mettre en valeur, n\u2019h\u00e9site pas \u00e0 \nrejoindre le club!

", - "body_fr": "De Riad Sattouf \u00e0 Katsuhiro Otomo, en passant par Andr\u00e9 Franquin, \nJacques Tardi, Didier Tarquin et Georges Wolinski, la BDth\u00e8que poss\u00e8de \nune collection de quatre mille bandes dessin\u00e9es sur une cinquantaine \nd\u2019\u00e9tag\u00e8res, en constante croissance. Class\u00e9es par dessinateur et \ncatalogu\u00e9es, toutes ces oeuvres offrent un large panorama du XXe si\u00e8cle \net sont librement consultables sur place sans mod\u00e9ration ! \u00c0 cela \ns\u2019ajoutent des milliers de p\u00e9riodiques sp\u00e9cialis\u00e9s datant de l\u2019\u00e2ge d\u2019or \nde la BD franco-belge, un Enfer cach\u00e9, et quelques conseils de lecture \n\u00e9crits par des fans.

\nLe club organise ausis des \u00e9v\u00e9nements divers par exemple un s\u00e9minaire \nsur la bande dessin\u00e9e, qui ne demande qu\u2019\u00e0 \u00eatre relanc\u00e9. \u00c0 l\u2019ordre du \njour, la mise en place d\u2019une exp\u00e9dition \u00e0 Angoul\u00eame avec le BDA en \njanvier 2017 pourrait m\u00eame se faire avec ton aide. Tous les \ndons et suggestions d\u2019achats sont les bienvenus. Pour participer aux \nd\u00e9cisions d\u2019achats, \u00e9crire des suggesions de lecture dans le BOcal, \nchoisir les bandes dessin\u00e9es \u00e0 mettre en valeur, n\u2019h\u00e9site pas \u00e0 \nrejoindre le club!

", - "body_en": "", - "links": "[{\"id\": \"9708004f-5d09-4cef-a60a-31b63fe5f377\", \"value\": {\"texte\": \"Mailing-liste\", \"email\": \"bdtheque@ens.fr\"}, \"type\": \"contact\"}]", - "links_fr": "[{\"id\": \"9708004f-5d09-4cef-a60a-31b63fe5f377\", \"value\": {\"texte\": \"Mailing-liste\", \"email\": \"bdtheque@ens.fr\"}, \"type\": \"contact\"}]", - "links_en": "[]", - "image": null - } -}, -{ - "model": "cofcms.cofdirectoryentrypage", - "pk": 22, - "fields": { - "title_fr": "MGEN", - "title_en": null, - "slug_fr": "mgen", - "slug_en": null, - "url_path_fr": "/global/site/partenaires/mgen/", - "url_path_en": "/global/site/partenaires/mgen/", - "seo_title_fr": null, - "seo_title_en": null, - "search_description_fr": "", - "search_description_en": "", - "body": "

La MGEN est un des \nprincipaux partenaires du COF. Elle\u00a0participe au financement des \nprincipaux \u00e9v\u00e9nements (Jour le plus court, 48h des Arts) et \u00e0 \nl\u2019impression de la Plakette Alpha.

\n

Elle dispose \u00e9galement d\u2019un stand chaque ann\u00e9e au moment de la \nrentr\u00e9e, afin de proposer ses prestations aux pensionnaires de l\u2019Ecole.

", - "body_fr": "

La MGEN est un des \nprincipaux partenaires du COF. Elle\u00a0participe au financement des \nprincipaux \u00e9v\u00e9nements (Jour le plus court, 48h des Arts) et \u00e0 \nl\u2019impression de la Plakette Alpha.

\n

Elle dispose \u00e9galement d\u2019un stand chaque ann\u00e9e au moment de la \nrentr\u00e9e, afin de proposer ses prestations aux pensionnaires de l\u2019Ecole.

", - "body_en": "", - "links": "[{\"id\": \"031dc9b4-9ac6-411c-8131-a3021c4edd0c\", \"value\": {\"url\": \"https://www.mgen.fr/accueil/\", \"texte\": \"Site internet\"}, \"type\": \"lien\"}]", - "links_fr": "[{\"id\": \"031dc9b4-9ac6-411c-8131-a3021c4edd0c\", \"value\": {\"url\": \"https://www.mgen.fr/accueil/\", \"texte\": \"Site internet\"}, \"type\": \"lien\"}]", - "links_en": "[]", - "image": 38 - } -}, -{ - "model": "cofcms.cofdirectoryentrypage", - "pk": 23, - "fields": { - "title_fr": "Soci\u00e9t\u00e9 G\u00e9n\u00e9rale", - "title_en": null, - "slug_fr": "soci\u00e9t\u00e9-g\u00e9n\u00e9rale", - "slug_en": null, - "url_path_fr": "/global/site/partenaires/soci\u00e9t\u00e9-g\u00e9n\u00e9rale/", - "url_path_en": "/global/site/partenaires/soci\u00e9t\u00e9-g\u00e9n\u00e9rale/", - "seo_title_fr": null, - "seo_title_en": null, - "search_description_fr": "", - "search_description_en": "", - "body": "

Si vous ouvrez un compte \u00e0 la SoG\u00e9, ils vous versent 140\u20ac et versent \naussi une somme au bureau, nous permettant de financer vos clubs et \n\u00e9v\u00e8nements. Vous pouvez donc rembourser votre cotisation au COF (voire \nplus) rien qu\u2019en ouvrant un compte !

\n

Vous devez ouvrir ce compte lors des journ\u00e9es de rentr\u00e9e, lorsque la \nSoG\u00e9 a un stand \u00e0 l\u2019Ecole, ou toute l\u2019ann\u00e9e \u00e0 leur agence au 38 rue \nGay-Lussac.

", - "body_fr": "

Si vous ouvrez un compte \u00e0 la SoG\u00e9, ils vous versent 140\u20ac et versent \naussi une somme au bureau, nous permettant de financer vos clubs et \n\u00e9v\u00e8nements. Vous pouvez donc rembourser votre cotisation au COF (voire \nplus) rien qu\u2019en ouvrant un compte !

\n

Vous devez ouvrir ce compte lors des journ\u00e9es de rentr\u00e9e, lorsque la \nSoG\u00e9 a un stand \u00e0 l\u2019Ecole, ou toute l\u2019ann\u00e9e \u00e0 leur agence au 38 rue \nGay-Lussac.

", - "body_en": "", - "links": "[]", - "links_fr": "[]", - "links_en": "[]", - "image": null - } -}, -{ - "model": "cofcms.cofdirectoryentrypage", - "pk": 24, - "fields": { - "title_fr": "MAIF", - "title_en": null, - "slug_fr": "maif", - "slug_en": null, - "url_path_fr": "/global/site/partenaires/maif/", - "url_path_en": "/global/site/partenaires/maif/", - "seo_title_fr": null, - "seo_title_en": null, - "search_description_fr": "", - "search_description_en": "", - "body": "

La Maif\u00a0est un partenaire important du COF, et participe notamment au financement de la Plakette.

\n

Elle est aussi pr\u00e9sente \u00e0 chaque rentr\u00e9e pour proposer ses services sous la forme d\u2019un stand d\u2019information.

", - "body_fr": "

La Maif\u00a0est un partenaire important du COF, et participe notamment au financement de la Plakette.

\n

Elle est aussi pr\u00e9sente \u00e0 chaque rentr\u00e9e pour proposer ses services sous la forme d\u2019un stand d\u2019information.

", - "body_en": "", - "links": "[{\"id\": \"87e216ff-343e-4f64-aae8-1141809a6631\", \"value\": {\"url\": \"http://www.maif.fr/accueil.html\", \"texte\": \"Site internet\"}, \"type\": \"lien\"}]", - "links_fr": "[{\"id\": \"87e216ff-343e-4f64-aae8-1141809a6631\", \"value\": {\"url\": \"http://www.maif.fr/accueil.html\", \"texte\": \"Site internet\"}, \"type\": \"lien\"}]", - "links_en": "[]", - "image": 39 - } -}, -{ - "model": "cofcms.cofutilpage", - "pk": 25, - "fields": {} -} -] diff --git a/gestioncof/cms/migrations/0001_initial.py b/gestioncof/cms/migrations/0001_initial.py index 27fe51ff..1cb704f4 100644 --- a/gestioncof/cms/migrations/0001_initial.py +++ b/gestioncof/cms/migrations/0001_initial.py @@ -1,14 +1,14 @@ # -*- coding: utf-8 -*- -# Generated by Django 1.11.9 on 2018-01-20 19:10 +# Generated by Django 1.11.18 on 2019-02-04 20:45 from __future__ import unicode_literals -import django.db.models.deletion -import wagtail.wagtailcore.blocks -import wagtail.wagtailcore.fields -import wagtail.wagtailimages.blocks from django.db import migrations, models - +import django.db.models.deletion import gestioncof.cms.models +import wagtail.contrib.routable_page.models +import wagtail.core.blocks +import wagtail.core.fields +import wagtail.images.blocks class Migration(migrations.Migration): @@ -16,925 +16,103 @@ class Migration(migrations.Migration): initial = True dependencies = [ - ("wagtailcore", "0033_remove_golive_expiry_help_text"), - ("wagtailimages", "0019_delete_filter"), + ('wagtailimages', '0021_image_file_hash'), + ('wagtailcore', '0040_page_draft_title'), ] operations = [ migrations.CreateModel( - name="COFActuIndexPage", + name='COFActuIndexPage', fields=[ - ( - "page_ptr", - models.OneToOneField( - auto_created=True, - on_delete=django.db.models.deletion.CASCADE, - parent_link=True, - primary_key=True, - serialize=False, - to="wagtailcore.Page", - ), - ), - ( - "title_fr", - models.CharField( - help_text="The page title as you'd like it to be seen by the public", - max_length=255, - null=True, - verbose_name="title", - ), - ), - ( - "title_en", - models.CharField( - help_text="The page title as you'd like it to be seen by the public", - max_length=255, - null=True, - verbose_name="title", - ), - ), - ( - "slug_fr", - models.SlugField( - allow_unicode=True, - help_text="The name of the page as it will appear in URLs e.g http://domain.com/blog/[my-slug]/", - max_length=255, - null=True, - verbose_name="slug", - ), - ), - ( - "slug_en", - models.SlugField( - allow_unicode=True, - help_text="The name of the page as it will appear in URLs e.g http://domain.com/blog/[my-slug]/", - max_length=255, - null=True, - verbose_name="slug", - ), - ), - ( - "url_path_fr", - models.TextField( - blank=True, editable=False, null=True, verbose_name="URL path" - ), - ), - ( - "url_path_en", - models.TextField( - blank=True, editable=False, null=True, verbose_name="URL path" - ), - ), - ( - "seo_title_fr", - models.CharField( - blank=True, - help_text="Optional. 'Search Engine Friendly' title. This will appear at the top of the browser window.", - max_length=255, - null=True, - verbose_name="page title", - ), - ), - ( - "seo_title_en", - models.CharField( - blank=True, - help_text="Optional. 'Search Engine Friendly' title. This will appear at the top of the browser window.", - max_length=255, - null=True, - verbose_name="page title", - ), - ), - ( - "search_description_fr", - models.TextField( - blank=True, null=True, verbose_name="search description" - ), - ), - ( - "search_description_en", - models.TextField( - blank=True, null=True, verbose_name="search description" - ), - ), + ('page_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='wagtailcore.Page')), ], options={ - "verbose_name": "Index des actualités", - "verbose_name_plural": "Indexs des actualités", + 'verbose_name': 'Index des actualités', + 'verbose_name_plural': 'Indexs des actualités', }, - bases=("wagtailcore.page", gestioncof.cms.models.COFActuIndexMixin), + bases=('wagtailcore.page', gestioncof.cms.models.COFActuIndexMixin), ), migrations.CreateModel( - name="COFActuPage", + name='COFActuPage', fields=[ - ( - "page_ptr", - models.OneToOneField( - auto_created=True, - on_delete=django.db.models.deletion.CASCADE, - parent_link=True, - primary_key=True, - serialize=False, - to="wagtailcore.Page", - ), - ), - ( - "title_fr", - models.CharField( - help_text="The page title as you'd like it to be seen by the public", - max_length=255, - null=True, - verbose_name="title", - ), - ), - ( - "title_en", - models.CharField( - help_text="The page title as you'd like it to be seen by the public", - max_length=255, - null=True, - verbose_name="title", - ), - ), - ( - "slug_fr", - models.SlugField( - allow_unicode=True, - help_text="The name of the page as it will appear in URLs e.g http://domain.com/blog/[my-slug]/", - max_length=255, - null=True, - verbose_name="slug", - ), - ), - ( - "slug_en", - models.SlugField( - allow_unicode=True, - help_text="The name of the page as it will appear in URLs e.g http://domain.com/blog/[my-slug]/", - max_length=255, - null=True, - verbose_name="slug", - ), - ), - ( - "url_path_fr", - models.TextField( - blank=True, editable=False, null=True, verbose_name="URL path" - ), - ), - ( - "url_path_en", - models.TextField( - blank=True, editable=False, null=True, verbose_name="URL path" - ), - ), - ( - "seo_title_fr", - models.CharField( - blank=True, - help_text="Optional. 'Search Engine Friendly' title. This will appear at the top of the browser window.", - max_length=255, - null=True, - verbose_name="page title", - ), - ), - ( - "seo_title_en", - models.CharField( - blank=True, - help_text="Optional. 'Search Engine Friendly' title. This will appear at the top of the browser window.", - max_length=255, - null=True, - verbose_name="page title", - ), - ), - ( - "search_description_fr", - models.TextField( - blank=True, null=True, verbose_name="search description" - ), - ), - ( - "search_description_en", - models.TextField( - blank=True, null=True, verbose_name="search description" - ), - ), - ( - "chapo", - models.TextField(blank=True, verbose_name="Description rapide"), - ), - ( - "chapo_fr", - models.TextField( - blank=True, null=True, verbose_name="Description rapide" - ), - ), - ( - "chapo_en", - models.TextField( - blank=True, null=True, verbose_name="Description rapide" - ), - ), - ( - "body", - wagtail.wagtailcore.fields.RichTextField(verbose_name="Contenu"), - ), - ( - "body_fr", - wagtail.wagtailcore.fields.RichTextField( - null=True, verbose_name="Contenu" - ), - ), - ( - "body_en", - wagtail.wagtailcore.fields.RichTextField( - null=True, verbose_name="Contenu" - ), - ), - ( - "is_event", - models.BooleanField(default=True, verbose_name="Évènement"), - ), - ( - "date_start", - models.DateTimeField(verbose_name="Date et heure de début"), - ), - ( - "date_end", - models.DateTimeField( - blank=True, - default=None, - null=True, - verbose_name="Date et heure de fin", - ), - ), - ( - "all_day", - models.BooleanField(default=False, verbose_name="Toute la journée"), - ), - ( - "image", - models.ForeignKey( - blank=True, - null=True, - on_delete=django.db.models.deletion.SET_NULL, - related_name="+", - to="wagtailimages.Image", - verbose_name="Image à la Une", - ), - ), - ], - options={"verbose_name": "Actualité", "verbose_name_plural": "Actualités"}, - bases=("wagtailcore.page",), - ), - migrations.CreateModel( - name="COFDirectoryEntryPage", - fields=[ - ( - "page_ptr", - models.OneToOneField( - auto_created=True, - on_delete=django.db.models.deletion.CASCADE, - parent_link=True, - primary_key=True, - serialize=False, - to="wagtailcore.Page", - ), - ), - ( - "title_fr", - models.CharField( - help_text="The page title as you'd like it to be seen by the public", - max_length=255, - null=True, - verbose_name="title", - ), - ), - ( - "title_en", - models.CharField( - help_text="The page title as you'd like it to be seen by the public", - max_length=255, - null=True, - verbose_name="title", - ), - ), - ( - "slug_fr", - models.SlugField( - allow_unicode=True, - help_text="The name of the page as it will appear in URLs e.g http://domain.com/blog/[my-slug]/", - max_length=255, - null=True, - verbose_name="slug", - ), - ), - ( - "slug_en", - models.SlugField( - allow_unicode=True, - help_text="The name of the page as it will appear in URLs e.g http://domain.com/blog/[my-slug]/", - max_length=255, - null=True, - verbose_name="slug", - ), - ), - ( - "url_path_fr", - models.TextField( - blank=True, editable=False, null=True, verbose_name="URL path" - ), - ), - ( - "url_path_en", - models.TextField( - blank=True, editable=False, null=True, verbose_name="URL path" - ), - ), - ( - "seo_title_fr", - models.CharField( - blank=True, - help_text="Optional. 'Search Engine Friendly' title. This will appear at the top of the browser window.", - max_length=255, - null=True, - verbose_name="page title", - ), - ), - ( - "seo_title_en", - models.CharField( - blank=True, - help_text="Optional. 'Search Engine Friendly' title. This will appear at the top of the browser window.", - max_length=255, - null=True, - verbose_name="page title", - ), - ), - ( - "search_description_fr", - models.TextField( - blank=True, null=True, verbose_name="search description" - ), - ), - ( - "search_description_en", - models.TextField( - blank=True, null=True, verbose_name="search description" - ), - ), - ( - "body", - wagtail.wagtailcore.fields.RichTextField( - verbose_name="Description" - ), - ), - ( - "body_fr", - wagtail.wagtailcore.fields.RichTextField( - null=True, verbose_name="Description" - ), - ), - ( - "body_en", - wagtail.wagtailcore.fields.RichTextField( - null=True, verbose_name="Description" - ), - ), - ( - "links", - wagtail.wagtailcore.fields.StreamField( - ( - ( - "lien", - wagtail.wagtailcore.blocks.StructBlock( - ( - ( - "url", - wagtail.wagtailcore.blocks.URLBlock( - required=True - ), - ), - ( - "texte", - wagtail.wagtailcore.blocks.CharBlock(), - ), - ) - ), - ), - ( - "contact", - wagtail.wagtailcore.blocks.StructBlock( - ( - ( - "email", - wagtail.wagtailcore.blocks.EmailBlock( - required=True - ), - ), - ( - "texte", - wagtail.wagtailcore.blocks.CharBlock(), - ), - ) - ), - ), - ) - ), - ), - ( - "links_fr", - wagtail.wagtailcore.fields.StreamField( - ( - ( - "lien", - wagtail.wagtailcore.blocks.StructBlock( - ( - ( - "url", - wagtail.wagtailcore.blocks.URLBlock( - required=True - ), - ), - ( - "texte", - wagtail.wagtailcore.blocks.CharBlock(), - ), - ) - ), - ), - ( - "contact", - wagtail.wagtailcore.blocks.StructBlock( - ( - ( - "email", - wagtail.wagtailcore.blocks.EmailBlock( - required=True - ), - ), - ( - "texte", - wagtail.wagtailcore.blocks.CharBlock(), - ), - ) - ), - ), - ), - null=True, - ), - ), - ( - "links_en", - wagtail.wagtailcore.fields.StreamField( - ( - ( - "lien", - wagtail.wagtailcore.blocks.StructBlock( - ( - ( - "url", - wagtail.wagtailcore.blocks.URLBlock( - required=True - ), - ), - ( - "texte", - wagtail.wagtailcore.blocks.CharBlock(), - ), - ) - ), - ), - ( - "contact", - wagtail.wagtailcore.blocks.StructBlock( - ( - ( - "email", - wagtail.wagtailcore.blocks.EmailBlock( - required=True - ), - ), - ( - "texte", - wagtail.wagtailcore.blocks.CharBlock(), - ), - ) - ), - ), - ), - null=True, - ), - ), - ( - "image", - models.ForeignKey( - blank=True, - null=True, - on_delete=django.db.models.deletion.SET_NULL, - related_name="+", - to="wagtailimages.Image", - verbose_name="Image", - ), - ), + ('page_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='wagtailcore.Page')), + ('chapo', models.TextField(blank=True, verbose_name='Description rapide')), + ('chapo_fr', models.TextField(blank=True, null=True, verbose_name='Description rapide')), + ('chapo_en', models.TextField(blank=True, null=True, verbose_name='Description rapide')), + ('body', wagtail.core.fields.RichTextField(verbose_name='Contenu')), + ('body_fr', wagtail.core.fields.RichTextField(null=True, verbose_name='Contenu')), + ('body_en', wagtail.core.fields.RichTextField(null=True, verbose_name='Contenu')), + ('is_event', models.BooleanField(default=True, verbose_name='Évènement')), + ('date_start', models.DateTimeField(verbose_name='Date et heure de début')), + ('date_end', models.DateTimeField(blank=True, default=None, null=True, verbose_name='Date et heure de fin')), + ('all_day', models.BooleanField(default=False, verbose_name='Toute la journée')), + ('image', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to='wagtailimages.Image', verbose_name='Image à la Une')), ], options={ - "verbose_name": "Éntrée d'annuaire", - "verbose_name_plural": "Éntrées d'annuaire", + 'verbose_name': 'Actualité', + 'verbose_name_plural': 'Actualités', }, - bases=("wagtailcore.page",), + bases=(wagtail.contrib.routable_page.models.RoutablePageMixin, 'wagtailcore.page'), ), migrations.CreateModel( - name="COFDirectoryPage", + name='COFDirectoryEntryPage', fields=[ - ( - "page_ptr", - models.OneToOneField( - auto_created=True, - on_delete=django.db.models.deletion.CASCADE, - parent_link=True, - primary_key=True, - serialize=False, - to="wagtailcore.Page", - ), - ), - ( - "title_fr", - models.CharField( - help_text="The page title as you'd like it to be seen by the public", - max_length=255, - null=True, - verbose_name="title", - ), - ), - ( - "title_en", - models.CharField( - help_text="The page title as you'd like it to be seen by the public", - max_length=255, - null=True, - verbose_name="title", - ), - ), - ( - "slug_fr", - models.SlugField( - allow_unicode=True, - help_text="The name of the page as it will appear in URLs e.g http://domain.com/blog/[my-slug]/", - max_length=255, - null=True, - verbose_name="slug", - ), - ), - ( - "slug_en", - models.SlugField( - allow_unicode=True, - help_text="The name of the page as it will appear in URLs e.g http://domain.com/blog/[my-slug]/", - max_length=255, - null=True, - verbose_name="slug", - ), - ), - ( - "url_path_fr", - models.TextField( - blank=True, editable=False, null=True, verbose_name="URL path" - ), - ), - ( - "url_path_en", - models.TextField( - blank=True, editable=False, null=True, verbose_name="URL path" - ), - ), - ( - "seo_title_fr", - models.CharField( - blank=True, - help_text="Optional. 'Search Engine Friendly' title. This will appear at the top of the browser window.", - max_length=255, - null=True, - verbose_name="page title", - ), - ), - ( - "seo_title_en", - models.CharField( - blank=True, - help_text="Optional. 'Search Engine Friendly' title. This will appear at the top of the browser window.", - max_length=255, - null=True, - verbose_name="page title", - ), - ), - ( - "search_description_fr", - models.TextField( - blank=True, null=True, verbose_name="search description" - ), - ), - ( - "search_description_en", - models.TextField( - blank=True, null=True, verbose_name="search description" - ), - ), - ( - "introduction", - wagtail.wagtailcore.fields.RichTextField( - verbose_name="Introduction" - ), - ), - ( - "introduction_fr", - wagtail.wagtailcore.fields.RichTextField( - null=True, verbose_name="Introduction" - ), - ), - ( - "introduction_en", - wagtail.wagtailcore.fields.RichTextField( - null=True, verbose_name="Introduction" - ), - ), + ('page_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='wagtailcore.Page')), + ('body', wagtail.core.fields.RichTextField(verbose_name='Description')), + ('body_fr', wagtail.core.fields.RichTextField(null=True, verbose_name='Description')), + ('body_en', wagtail.core.fields.RichTextField(null=True, verbose_name='Description')), + ('links', wagtail.core.fields.StreamField([('lien', wagtail.core.blocks.StructBlock([('url', wagtail.core.blocks.URLBlock(required=True)), ('texte', wagtail.core.blocks.CharBlock())])), ('contact', wagtail.core.blocks.StructBlock([('email', wagtail.core.blocks.EmailBlock(required=True)), ('texte', wagtail.core.blocks.CharBlock())]))])), + ('links_fr', wagtail.core.fields.StreamField([('lien', wagtail.core.blocks.StructBlock([('url', wagtail.core.blocks.URLBlock(required=True)), ('texte', wagtail.core.blocks.CharBlock())])), ('contact', wagtail.core.blocks.StructBlock([('email', wagtail.core.blocks.EmailBlock(required=True)), ('texte', wagtail.core.blocks.CharBlock())]))], null=True)), + ('links_en', wagtail.core.fields.StreamField([('lien', wagtail.core.blocks.StructBlock([('url', wagtail.core.blocks.URLBlock(required=True)), ('texte', wagtail.core.blocks.CharBlock())])), ('contact', wagtail.core.blocks.StructBlock([('email', wagtail.core.blocks.EmailBlock(required=True)), ('texte', wagtail.core.blocks.CharBlock())]))], null=True)), + ('image', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to='wagtailimages.Image', verbose_name='Image')), ], options={ - "verbose_name": "Annuaire (clubs, partenaires, bons plans...)", - "verbose_name_plural": "Annuaires", + 'verbose_name': "Entrée d'annuaire", + 'verbose_name_plural': "Entrées d'annuaire", }, - bases=("wagtailcore.page",), + bases=('wagtailcore.page',), ), migrations.CreateModel( - name="COFPage", + name='COFDirectoryPage', fields=[ - ( - "page_ptr", - models.OneToOneField( - auto_created=True, - on_delete=django.db.models.deletion.CASCADE, - parent_link=True, - primary_key=True, - serialize=False, - to="wagtailcore.Page", - ), - ), - ( - "title_fr", - models.CharField( - help_text="The page title as you'd like it to be seen by the public", - max_length=255, - null=True, - verbose_name="title", - ), - ), - ( - "title_en", - models.CharField( - help_text="The page title as you'd like it to be seen by the public", - max_length=255, - null=True, - verbose_name="title", - ), - ), - ( - "slug_fr", - models.SlugField( - allow_unicode=True, - help_text="The name of the page as it will appear in URLs e.g http://domain.com/blog/[my-slug]/", - max_length=255, - null=True, - verbose_name="slug", - ), - ), - ( - "slug_en", - models.SlugField( - allow_unicode=True, - help_text="The name of the page as it will appear in URLs e.g http://domain.com/blog/[my-slug]/", - max_length=255, - null=True, - verbose_name="slug", - ), - ), - ( - "url_path_fr", - models.TextField( - blank=True, editable=False, null=True, verbose_name="URL path" - ), - ), - ( - "url_path_en", - models.TextField( - blank=True, editable=False, null=True, verbose_name="URL path" - ), - ), - ( - "seo_title_fr", - models.CharField( - blank=True, - help_text="Optional. 'Search Engine Friendly' title. This will appear at the top of the browser window.", - max_length=255, - null=True, - verbose_name="page title", - ), - ), - ( - "seo_title_en", - models.CharField( - blank=True, - help_text="Optional. 'Search Engine Friendly' title. This will appear at the top of the browser window.", - max_length=255, - null=True, - verbose_name="page title", - ), - ), - ( - "search_description_fr", - models.TextField( - blank=True, null=True, verbose_name="search description" - ), - ), - ( - "search_description_en", - models.TextField( - blank=True, null=True, verbose_name="search description" - ), - ), - ( - "body", - wagtail.wagtailcore.fields.StreamField( - ( - ( - "heading", - wagtail.wagtailcore.blocks.CharBlock( - classname="full title" - ), - ), - ("paragraph", wagtail.wagtailcore.blocks.RichTextBlock()), - ("image", wagtail.wagtailimages.blocks.ImageChooserBlock()), - ) - ), - ), - ( - "body_fr", - wagtail.wagtailcore.fields.StreamField( - ( - ( - "heading", - wagtail.wagtailcore.blocks.CharBlock( - classname="full title" - ), - ), - ("paragraph", wagtail.wagtailcore.blocks.RichTextBlock()), - ("image", wagtail.wagtailimages.blocks.ImageChooserBlock()), - ), - null=True, - ), - ), - ( - "body_en", - wagtail.wagtailcore.fields.StreamField( - ( - ( - "heading", - wagtail.wagtailcore.blocks.CharBlock( - classname="full title" - ), - ), - ("paragraph", wagtail.wagtailcore.blocks.RichTextBlock()), - ("image", wagtail.wagtailimages.blocks.ImageChooserBlock()), - ), - null=True, - ), - ), + ('page_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='wagtailcore.Page')), + ('introduction', wagtail.core.fields.RichTextField(verbose_name='Introduction')), + ('introduction_fr', wagtail.core.fields.RichTextField(null=True, verbose_name='Introduction')), + ('introduction_en', wagtail.core.fields.RichTextField(null=True, verbose_name='Introduction')), + ('alphabetique', models.BooleanField(default=True, verbose_name='Tri par ordre alphabétique ?')), ], options={ - "verbose_name": "Page normale COF", - "verbose_name_plural": "Pages normales COF", + 'verbose_name': 'Annuaire (clubs, partenaires, bons plans...)', + 'verbose_name_plural': 'Annuaires', }, - bases=("wagtailcore.page",), + bases=('wagtailcore.page',), ), migrations.CreateModel( - name="COFRootPage", + name='COFPage', fields=[ - ( - "page_ptr", - models.OneToOneField( - auto_created=True, - on_delete=django.db.models.deletion.CASCADE, - parent_link=True, - primary_key=True, - serialize=False, - to="wagtailcore.Page", - ), - ), - ( - "title_fr", - models.CharField( - help_text="The page title as you'd like it to be seen by the public", - max_length=255, - null=True, - verbose_name="title", - ), - ), - ( - "title_en", - models.CharField( - help_text="The page title as you'd like it to be seen by the public", - max_length=255, - null=True, - verbose_name="title", - ), - ), - ( - "slug_fr", - models.SlugField( - allow_unicode=True, - help_text="The name of the page as it will appear in URLs e.g http://domain.com/blog/[my-slug]/", - max_length=255, - null=True, - verbose_name="slug", - ), - ), - ( - "slug_en", - models.SlugField( - allow_unicode=True, - help_text="The name of the page as it will appear in URLs e.g http://domain.com/blog/[my-slug]/", - max_length=255, - null=True, - verbose_name="slug", - ), - ), - ( - "url_path_fr", - models.TextField( - blank=True, editable=False, null=True, verbose_name="URL path" - ), - ), - ( - "url_path_en", - models.TextField( - blank=True, editable=False, null=True, verbose_name="URL path" - ), - ), - ( - "seo_title_fr", - models.CharField( - blank=True, - help_text="Optional. 'Search Engine Friendly' title. This will appear at the top of the browser window.", - max_length=255, - null=True, - verbose_name="page title", - ), - ), - ( - "seo_title_en", - models.CharField( - blank=True, - help_text="Optional. 'Search Engine Friendly' title. This will appear at the top of the browser window.", - max_length=255, - null=True, - verbose_name="page title", - ), - ), - ( - "search_description_fr", - models.TextField( - blank=True, null=True, verbose_name="search description" - ), - ), - ( - "search_description_en", - models.TextField( - blank=True, null=True, verbose_name="search description" - ), - ), - ( - "introduction", - wagtail.wagtailcore.fields.RichTextField( - verbose_name="Introduction" - ), - ), - ( - "introduction_fr", - wagtail.wagtailcore.fields.RichTextField( - null=True, verbose_name="Introduction" - ), - ), - ( - "introduction_en", - wagtail.wagtailcore.fields.RichTextField( - null=True, verbose_name="Introduction" - ), - ), + ('page_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='wagtailcore.Page')), + ('body', wagtail.core.fields.StreamField([('heading', wagtail.core.blocks.CharBlock(classname='full title')), ('paragraph', wagtail.core.blocks.RichTextBlock()), ('image', wagtail.images.blocks.ImageChooserBlock()), ('iframe', wagtail.core.blocks.StructBlock([('url', wagtail.core.blocks.URLBlock('Adresse de la page')), ('height', wagtail.core.blocks.CharBlock('Hauteur (en pixels)'))]))])), + ('body_fr', wagtail.core.fields.StreamField([('heading', wagtail.core.blocks.CharBlock(classname='full title')), ('paragraph', wagtail.core.blocks.RichTextBlock()), ('image', wagtail.images.blocks.ImageChooserBlock()), ('iframe', wagtail.core.blocks.StructBlock([('url', wagtail.core.blocks.URLBlock('Adresse de la page')), ('height', wagtail.core.blocks.CharBlock('Hauteur (en pixels)'))]))], null=True)), + ('body_en', wagtail.core.fields.StreamField([('heading', wagtail.core.blocks.CharBlock(classname='full title')), ('paragraph', wagtail.core.blocks.RichTextBlock()), ('image', wagtail.images.blocks.ImageChooserBlock()), ('iframe', wagtail.core.blocks.StructBlock([('url', wagtail.core.blocks.URLBlock('Adresse de la page')), ('height', wagtail.core.blocks.CharBlock('Hauteur (en pixels)'))]))], null=True)), ], options={ - "verbose_name": "Racine site du COF", - "verbose_name_plural": "Racines site du COF", + 'verbose_name': 'Page normale COF', + 'verbose_name_plural': 'Pages normales COF', }, - bases=("wagtailcore.page", gestioncof.cms.models.COFActuIndexMixin), + bases=('wagtailcore.page',), + ), + migrations.CreateModel( + name='COFRootPage', + fields=[ + ('page_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='wagtailcore.Page')), + ('introduction', wagtail.core.fields.RichTextField(verbose_name='Introduction')), + ('introduction_fr', wagtail.core.fields.RichTextField(null=True, verbose_name='Introduction')), + ('introduction_en', wagtail.core.fields.RichTextField(null=True, verbose_name='Introduction')), + ], + options={ + 'verbose_name': 'Racine site du COF', + 'verbose_name_plural': 'Racines site du COF', + }, + bases=('wagtailcore.page', gestioncof.cms.models.COFActuIndexMixin), ), ] diff --git a/gestioncof/cms/migrations/0002_utilpage_and_fixes.py b/gestioncof/cms/migrations/0002_utilpage_and_fixes.py deleted file mode 100644 index e628b81f..00000000 --- a/gestioncof/cms/migrations/0002_utilpage_and_fixes.py +++ /dev/null @@ -1,160 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by Django 1.11.9 on 2018-04-28 13:46 -from __future__ import unicode_literals - -import django.db.models.deletion -import wagtail.contrib.wagtailroutablepage.models -import wagtail.wagtailcore.blocks -import wagtail.wagtailcore.fields -import wagtail.wagtailimages.blocks -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ("wagtailcore", "0039_collectionviewrestriction"), - ("cofcms", "0001_initial"), - ] - - operations = [ - migrations.CreateModel( - name="COFUtilPage", - fields=[ - ( - "page_ptr", - models.OneToOneField( - auto_created=True, - on_delete=django.db.models.deletion.CASCADE, - parent_link=True, - primary_key=True, - serialize=False, - to="wagtailcore.Page", - ), - ) - ], - options={ - "verbose_name": "Page utilitaire", - "verbose_name_plural": "Pages utilitaires", - }, - bases=( - wagtail.contrib.wagtailroutablepage.models.RoutablePageMixin, - "wagtailcore.page", - ), - ), - migrations.AlterModelOptions( - name="cofdirectoryentrypage", - options={ - "verbose_name": "Entrée d'annuaire", - "verbose_name_plural": "Entrées d'annuaire", - }, - ), - migrations.AddField( - model_name="cofdirectorypage", - name="alphabetique", - field=models.BooleanField( - default=True, verbose_name="Tri par ordre alphabétique ?" - ), - ), - migrations.AlterField( - model_name="cofpage", - name="body", - field=wagtail.wagtailcore.fields.StreamField( - ( - ( - "heading", - wagtail.wagtailcore.blocks.CharBlock(classname="full title"), - ), - ("paragraph", wagtail.wagtailcore.blocks.RichTextBlock()), - ("image", wagtail.wagtailimages.blocks.ImageChooserBlock()), - ( - "iframe", - wagtail.wagtailcore.blocks.StructBlock( - ( - ( - "url", - wagtail.wagtailcore.blocks.URLBlock( - "Adresse de la page" - ), - ), - ( - "height", - wagtail.wagtailcore.blocks.CharBlock( - "Hauteur (en pixels)" - ), - ), - ) - ), - ), - ) - ), - ), - migrations.AlterField( - model_name="cofpage", - name="body_en", - field=wagtail.wagtailcore.fields.StreamField( - ( - ( - "heading", - wagtail.wagtailcore.blocks.CharBlock(classname="full title"), - ), - ("paragraph", wagtail.wagtailcore.blocks.RichTextBlock()), - ("image", wagtail.wagtailimages.blocks.ImageChooserBlock()), - ( - "iframe", - wagtail.wagtailcore.blocks.StructBlock( - ( - ( - "url", - wagtail.wagtailcore.blocks.URLBlock( - "Adresse de la page" - ), - ), - ( - "height", - wagtail.wagtailcore.blocks.CharBlock( - "Hauteur (en pixels)" - ), - ), - ) - ), - ), - ), - null=True, - ), - ), - migrations.AlterField( - model_name="cofpage", - name="body_fr", - field=wagtail.wagtailcore.fields.StreamField( - ( - ( - "heading", - wagtail.wagtailcore.blocks.CharBlock(classname="full title"), - ), - ("paragraph", wagtail.wagtailcore.blocks.RichTextBlock()), - ("image", wagtail.wagtailimages.blocks.ImageChooserBlock()), - ( - "iframe", - wagtail.wagtailcore.blocks.StructBlock( - ( - ( - "url", - wagtail.wagtailcore.blocks.URLBlock( - "Adresse de la page" - ), - ), - ( - "height", - wagtail.wagtailcore.blocks.CharBlock( - "Hauteur (en pixels)" - ), - ), - ) - ), - ), - ), - null=True, - ), - ), - ] diff --git a/gestioncof/cms/models.py b/gestioncof/cms/models.py index 10c090fe..7587509e 100644 --- a/gestioncof/cms/models.py +++ b/gestioncof/cms/models.py @@ -1,12 +1,12 @@ from django.core.paginator import EmptyPage, PageNotAnInteger, Paginator from django.db import models -from wagtail.contrib.wagtailroutablepage.models import RoutablePageMixin, route -from wagtail.wagtailadmin.edit_handlers import FieldPanel, StreamFieldPanel -from wagtail.wagtailcore import blocks -from wagtail.wagtailcore.fields import RichTextField, StreamField -from wagtail.wagtailcore.models import Page -from wagtail.wagtailimages.blocks import ImageChooserBlock -from wagtail.wagtailimages.edit_handlers import ImageChooserPanel +from wagtail.contrib.routable_page.models import RoutablePageMixin, route +from wagtail.admin.edit_handlers import FieldPanel, StreamFieldPanel +from wagtail.core import blocks +from wagtail.core.fields import RichTextField, StreamField +from wagtail.core.models import Page +from wagtail.images.blocks import ImageChooserBlock +from wagtail.images.edit_handlers import ImageChooserPanel # Page pouvant afficher des actualités @@ -18,19 +18,26 @@ class COFActuIndexMixin: # Racine du site du COF -class COFRootPage(Page, COFActuIndexMixin): +class COFRootPage(RoutablePageMixin, Page, COFActuIndexMixin): introduction = RichTextField("Introduction") content_panels = Page.content_panels + [ FieldPanel("introduction", classname="full") ] - subpage_types = ["COFActuIndexPage", "COFPage", "COFDirectoryPage", "COFUtilPage"] + subpage_types = ["COFActuIndexPage", "COFPage", "COFDirectoryPage"] class Meta: verbose_name = "Racine site du COF" verbose_name_plural = "Racines site du COF" + # Mini calendrier + @route(r"^calendar/(\d+)/(\d+)/$") + def calendar(self, request, year, month): + from .views import raw_calendar_view + + return raw_calendar_view(request, int(year), int(month)) + # Block iframe class IFrameBlock(blocks.StructBlock): @@ -199,36 +206,3 @@ class COFDirectoryEntryPage(Page): class Meta: verbose_name = "Entrée d'annuaire" verbose_name_plural = "Entrées d'annuaire" - - -# Pour le calendrier, ne doit pas être pris par ModelTranslation -class COFUtilPage(RoutablePageMixin, Page): - - # Mini calendrier - @route(r"^calendar/(\d+)/(\d+)/$") - def calendar(self, request, year, month): - from .views import raw_calendar_view - - return raw_calendar_view(request, int(year), int(month)) - - """ - ModelTranslation override le système des @route de wagtail, ce qui empêche - COFUtilPage d'être une page traduite pour pouvoir l'utiliser. - Ce qui fait planter `get_absolute_url` pour des problèmes d'héritage des - pages parentes (qui sont, elles, traduites). - Le seul moyen trouvé pour résoudre ce problème est de faire une autre - fonction à qui on fournit request en argument (donc pas un override de - get_absolute_url). - - TODO : vérifier si ces problèmes ont été résolus dans les màj de wagtail - et modeltranslation - """ - - def debugged_get_url(self, request): - parent = COFRootPage.objects.parent_of(self).live().first() - burl = parent.relative_url(request.site) - return burl + self.slug - - class Meta: - verbose_name = "Page utilitaire" - verbose_name_plural = "Pages utilitaires" diff --git a/gestioncof/cms/templates/cofcms/base_nav.html b/gestioncof/cms/templates/cofcms/base_nav.html index a7a299b0..b7ce4c66 100644 --- a/gestioncof/cms/templates/cofcms/base_nav.html +++ b/gestioncof/cms/templates/cofcms/base_nav.html @@ -3,8 +3,8 @@ {% for item in menu_items %}
  • {% if item.link_page %} - - {{ item.link_page.specific.title }} + + {{ item.link_page.title }} {% else %} diff --git a/gestioncof/cms/templatetags/cofcms_tags.py b/gestioncof/cms/templatetags/cofcms_tags.py index 686f15f6..34b37657 100644 --- a/gestioncof/cms/templatetags/cofcms_tags.py +++ b/gestioncof/cms/templatetags/cofcms_tags.py @@ -4,7 +4,7 @@ from django import template from django.utils import formats, timezone from django.utils.translation import ugettext as _ -from ..models import COFActuPage, COFUtilPage +from ..models import COFActuPage, COFRootPage register = template.Library() @@ -71,11 +71,11 @@ def calendar(context, month=None, year=None): # Calendar next/prev urls try: - utilpage = COFUtilPage.objects.live()[0] - except COFUtilPage.DoesNotExist: + utilpage = COFRootPage.objects.live()[0] + except COFRootPage.DoesNotExist: utilpage = None request = context["request"] - burl = utilpage.debugged_get_url(request) + "/" + burl = utilpage.get_url(request) prev_url = burl + utilpage.reverse_subpage( "calendar", args=[str(prev_month.year), str(prev_month.month)] ) diff --git a/gestioncof/cms/translation.py b/gestioncof/cms/translation.py index 0a11520e..ea5a6c9d 100644 --- a/gestioncof/cms/translation.py +++ b/gestioncof/cms/translation.py @@ -1,5 +1,5 @@ from modeltranslation.decorators import register -from wagtail_modeltranslation.translator import WagtailTranslationOptions +from modeltranslation.translator import TranslationOptions from .models import ( COFActuIndexPage, @@ -12,30 +12,30 @@ from .models import ( @register(COFRootPage) -class COFRootPageTr(WagtailTranslationOptions): +class COFRootPageTr(TranslationOptions): fields = ("introduction",) @register(COFPage) -class COFPageTr(WagtailTranslationOptions): +class COFPageTr(TranslationOptions): fields = ("body",) @register(COFActuIndexPage) -class COFActuIndexPageTr(WagtailTranslationOptions): +class COFActuIndexPageTr(TranslationOptions): fields = () @register(COFActuPage) -class COFActuPageTr(WagtailTranslationOptions): +class COFActuPageTr(TranslationOptions): fields = ("chapo", "body") @register(COFDirectoryPage) -class COFDirectoryPageTr(WagtailTranslationOptions): +class COFDirectoryPageTr(TranslationOptions): fields = ("introduction",) @register(COFDirectoryEntryPage) -class COFDirectoryEntryPageTr(WagtailTranslationOptions): +class COFDirectoryEntryPageTr(TranslationOptions): fields = ("body", "links") diff --git a/kfet/cms/hooks.py b/kfet/cms/hooks.py index a3070cfb..55551ec6 100644 --- a/kfet/cms/hooks.py +++ b/kfet/cms/hooks.py @@ -1,6 +1,6 @@ from django.contrib.staticfiles.templatetags.staticfiles import static from django.utils.html import format_html -from wagtail.wagtailcore import hooks +from wagtail.core import hooks @hooks.register("insert_editor_css") diff --git a/kfet/cms/management/commands/kfet_loadwagtail.py b/kfet/cms/management/commands/kfet_loadwagtail.py index 566cca43..e5869f81 100644 --- a/kfet/cms/management/commands/kfet_loadwagtail.py +++ b/kfet/cms/management/commands/kfet_loadwagtail.py @@ -1,7 +1,7 @@ from django.contrib.auth.models import Group from django.core.management import call_command from django.core.management.base import BaseCommand -from wagtail.wagtailcore.models import Page, Site +from wagtail.core.models import Page, Site class Command(BaseCommand): diff --git a/kfet/cms/migrations/0001_initial.py b/kfet/cms/migrations/0001_initial.py index 8c075903..60bfed50 100644 --- a/kfet/cms/migrations/0001_initial.py +++ b/kfet/cms/migrations/0001_initial.py @@ -2,9 +2,9 @@ from __future__ import unicode_literals import django.db.models.deletion -import wagtail.wagtailcore.blocks -import wagtail.wagtailcore.fields -import wagtail.wagtailsnippets.blocks +import wagtail.core.blocks +import wagtail.core.fields +import wagtail.snippets.blocks from django.db import migrations, models import kfet.cms.models @@ -42,22 +42,22 @@ class Migration(migrations.Migration): ), ( "content", - wagtail.wagtailcore.fields.StreamField( + wagtail.core.fields.StreamField( ( ( "rich", - wagtail.wagtailcore.blocks.RichTextBlock( + wagtail.core.blocks.RichTextBlock( label="Éditeur" ), ), ("carte", kfet.cms.models.MenuBlock()), ( "group_team", - wagtail.wagtailcore.blocks.StructBlock( + wagtail.core.blocks.StructBlock( ( ( "show_only", - wagtail.wagtailcore.blocks.IntegerBlock( + wagtail.core.blocks.IntegerBlock( help_text="Nombre initial de membres affichés. Laisser vide pour tou-te-s les afficher.", required=False, label="Montrer seulement", @@ -65,8 +65,8 @@ class Migration(migrations.Migration): ), ( "members", - wagtail.wagtailcore.blocks.ListBlock( - wagtail.wagtailsnippets.blocks.SnippetChooserBlock( + wagtail.core.blocks.ListBlock( + wagtail.snippets.blocks.SnippetChooserBlock( kfet.cms.models.MemberTeam ), classname="team-group", @@ -78,22 +78,22 @@ class Migration(migrations.Migration): ), ( "group", - wagtail.wagtailcore.blocks.StreamBlock( + wagtail.core.blocks.StreamBlock( ( ( "rich", - wagtail.wagtailcore.blocks.RichTextBlock( + wagtail.core.blocks.RichTextBlock( label="Éditeur" ), ), ("carte", kfet.cms.models.MenuBlock()), ( "group_team", - wagtail.wagtailcore.blocks.StructBlock( + wagtail.core.blocks.StructBlock( ( ( "show_only", - wagtail.wagtailcore.blocks.IntegerBlock( + wagtail.core.blocks.IntegerBlock( help_text="Nombre initial de membres affichés. Laisser vide pour tou-te-s les afficher.", required=False, label="Montrer seulement", @@ -101,8 +101,8 @@ class Migration(migrations.Migration): ), ( "members", - wagtail.wagtailcore.blocks.ListBlock( - wagtail.wagtailsnippets.blocks.SnippetChooserBlock( + wagtail.core.blocks.ListBlock( + wagtail.snippets.blocks.SnippetChooserBlock( kfet.cms.models.MemberTeam ), classname="team-group", diff --git a/kfet/cms/models.py b/kfet/cms/models.py index 6d108f31..b9061b21 100644 --- a/kfet/cms/models.py +++ b/kfet/cms/models.py @@ -1,17 +1,17 @@ from django.db import models from django.utils.translation import ugettext_lazy as _ -from wagtail.wagtailadmin.edit_handlers import ( +from wagtail.admin.edit_handlers import ( FieldPanel, FieldRowPanel, MultiFieldPanel, StreamFieldPanel, ) -from wagtail.wagtailcore import blocks -from wagtail.wagtailcore.fields import StreamField -from wagtail.wagtailcore.models import Page -from wagtail.wagtailimages.edit_handlers import ImageChooserPanel -from wagtail.wagtailsnippets.blocks import SnippetChooserBlock -from wagtail.wagtailsnippets.models import register_snippet +from wagtail.core import blocks +from wagtail.core.fields import StreamField +from wagtail.core.models import Page +from wagtail.images.edit_handlers import ImageChooserPanel +from wagtail.snippets.blocks import SnippetChooserBlock +from wagtail.snippets.models import register_snippet from kfet.cms.context_processors import get_articles diff --git a/kfet/cms/translation.py b/kfet/cms/translation.py new file mode 100644 index 00000000..a947b0e4 --- /dev/null +++ b/kfet/cms/translation.py @@ -0,0 +1,11 @@ +from modeltranslation.decorators import register +from modeltranslation.translator import TranslationOptions + +from .models import ( + KFetPage, +) + + +@register(KFetPage) +class KFetPageTr(TranslationOptions): + fields = [] diff --git a/provisioning/prepare_django.sh b/provisioning/prepare_django.sh index b91f92e6..fef91983 100644 --- a/provisioning/prepare_django.sh +++ b/provisioning/prepare_django.sh @@ -4,6 +4,7 @@ set -e python manage.py migrate +python manage.py sync_page_translation_fields python manage.py loaddata gestion sites articles python manage.py loaddevdata python manage.py syncmails gestioncof/management/data/custommail.json diff --git a/requirements.txt b/requirements.txt index 4d443d16..73b3d78f 100644 --- a/requirements.txt +++ b/requirements.txt @@ -20,9 +20,9 @@ git+https://git.eleves.ens.fr/cof-geek/django_custommail.git#egg=django_customma ldap3 channels==1.1.5 python-dateutil -wagtail==1.11.* -wagtailmenus==2.2.* -wagtail-modeltranslation==0.6.0rc2 +wagtail==2.3.* +wagtailmenus==2.12.* +wagtail-modeltranslation==0.9.* django-cors-headers==2.2.0 # Production tools