Fixtures à jour pour Wagtail2 et wagtail-translation 0.9

This commit is contained in:
Evarin 2019-02-11 21:10:11 +01:00
parent 1c45dd833d
commit 4f6579c3d1
5 changed files with 2323 additions and 1460 deletions

View file

@ -0,0 +1,696 @@
[
{
"model": "wagtailcore.page",
"pk": 27,
"fields": {
"path": "000100010002",
"depth": 3,
"numchild": 3,
"title": "Site du COF",
"title_fr": "Site du COF",
"title_en": null,
"draft_title": "Site du COF",
"slug": "site",
"slug_fr": "site",
"slug_en": null,
"content_type": [
"cofcms",
"cofrootpage"
],
"live": true,
"has_unpublished_changes": false,
"url_path": "/global/site/",
"url_path_fr": "/global/site/",
"url_path_en": "/global/site/",
"owner": [
"root"
],
"seo_title": "",
"seo_title_fr": null,
"seo_title_en": null,
"show_in_menus": false,
"search_description": "",
"search_description_fr": "",
"search_description_en": "",
"go_live_at": null,
"expire_at": null,
"expired": false,
"locked": false,
"first_published_at": "2019-02-04T20:54:14.724Z",
"last_published_at": "2019-02-04T20:54:14.724Z",
"latest_revision_created_at": null,
"live_revision": null
}
},
{
"model": "wagtailcore.page",
"pk": 28,
"fields": {
"path": "0001000100020001",
"depth": 4,
"numchild": 0,
"title": "Pr\u00e9sentation",
"title_fr": "Pr\u00e9sentation",
"title_en": "Presentation",
"draft_title": "Pr\u00e9sentation",
"slug": "pr\u00e9sentation",
"slug_fr": "pr\u00e9sentation",
"slug_en": null,
"content_type": [
"cofcms",
"cofpage"
],
"live": true,
"has_unpublished_changes": false,
"url_path": "/global/site/pr\u00e9sentation/",
"url_path_fr": "/global/site/pr\u00e9sentation/",
"url_path_en": "/global/site/pr\u00e9sentation/",
"owner": [
"root"
],
"seo_title": "",
"seo_title_fr": null,
"seo_title_en": null,
"show_in_menus": true,
"search_description": "",
"search_description_fr": "",
"search_description_en": "",
"go_live_at": null,
"expire_at": null,
"expired": false,
"locked": false,
"first_published_at": "2019-02-04T20:55:06.574Z",
"last_published_at": "2019-02-04T21:42:00.461Z",
"latest_revision_created_at": null,
"live_revision": null
}
},
{
"model": "wagtailcore.page",
"pk": 29,
"fields": {
"path": "0001000100020002",
"depth": 4,
"numchild": 2,
"title": "Actualit\u00e9s",
"title_fr": "Actualit\u00e9s",
"title_en": "News",
"draft_title": "Actualit\u00e9s",
"slug": "actualit\u00e9s",
"slug_fr": "actualit\u00e9s",
"slug_en": "news",
"content_type": [
"cofcms",
"cofactuindexpage"
],
"live": true,
"has_unpublished_changes": false,
"url_path": "/global/site/actualit\u00e9s/",
"url_path_fr": "/global/site/actualit\u00e9s/",
"url_path_en": "/global/site/news/",
"owner": [
"root"
],
"seo_title": "",
"seo_title_fr": null,
"seo_title_en": null,
"show_in_menus": true,
"search_description": "",
"search_description_fr": "",
"search_description_en": "",
"go_live_at": null,
"expire_at": null,
"expired": false,
"locked": false,
"first_published_at": "2019-02-04T20:58:47.657Z",
"last_published_at": "2019-02-04T21:43:55.575Z",
"latest_revision_created_at": null,
"live_revision": null
}
},
{
"model": "wagtailcore.page",
"pk": 30,
"fields": {
"path": "00010001000200020001",
"depth": 5,
"numchild": 0,
"title": "Grosse teuf en K-F\u00eat",
"title_fr": "Grosse teuf en K-F\u00eat",
"title_en": "Big feast in K-F\u00eat",
"draft_title": "Grosse teuf en K-F\u00eat",
"slug": "grosse-teuf-en-k-f\u00eat",
"slug_fr": "grosse-teuf-en-k-f\u00eat",
"slug_en": "big-feast-in-k-f\u00eat",
"content_type": [
"cofcms",
"cofactupage"
],
"live": true,
"has_unpublished_changes": false,
"url_path": "/global/site/actualit\u00e9s/grosse-teuf-en-k-f\u00eat/",
"url_path_fr": "/global/site/actualit\u00e9s/grosse-teuf-en-k-f\u00eat/",
"url_path_en": "/global/site/news/big-feast-in-k-f\u00eat/",
"owner": [
"root"
],
"seo_title": "",
"seo_title_fr": null,
"seo_title_en": null,
"show_in_menus": false,
"search_description": "",
"search_description_fr": "",
"search_description_en": "",
"go_live_at": null,
"expire_at": null,
"expired": false,
"locked": false,
"first_published_at": "2019-02-04T21:04:39.422Z",
"last_published_at": "2019-02-04T21:04:39.422Z",
"latest_revision_created_at": null,
"live_revision": null
}
},
{
"model": "wagtailcore.page",
"pk": 31,
"fields": {
"path": "00010001000200020002",
"depth": 5,
"numchild": 0,
"title": "Les 48h des Arts",
"title_fr": "Les 48h des Arts",
"title_en": null,
"draft_title": "Les 48h des Arts",
"slug": "les-48h-des-arts",
"slug_fr": "les-48h-des-arts",
"slug_en": null,
"content_type": [
"cofcms",
"cofactupage"
],
"live": true,
"has_unpublished_changes": false,
"url_path": "/global/site/actualit\u00e9s/les-48h-des-arts/",
"url_path_fr": "/global/site/actualit\u00e9s/les-48h-des-arts/",
"url_path_en": "/global/site/news/les-48h-des-arts/",
"owner": [
"root"
],
"seo_title": "",
"seo_title_fr": null,
"seo_title_en": null,
"show_in_menus": false,
"search_description": "",
"search_description_fr": "",
"search_description_en": "",
"go_live_at": null,
"expire_at": null,
"expired": false,
"locked": false,
"first_published_at": "2019-02-04T21:05:27.190Z",
"last_published_at": "2019-02-04T21:05:27.190Z",
"latest_revision_created_at": null,
"live_revision": null
}
},
{
"model": "wagtailcore.page",
"pk": 32,
"fields": {
"path": "0001000100020003",
"depth": 4,
"numchild": 1,
"title": "Clubs",
"title_fr": "Clubs",
"title_en": null,
"draft_title": "Clubs",
"slug": "clubs",
"slug_fr": "clubs",
"slug_en": null,
"content_type": [
"cofcms",
"cofdirectorypage"
],
"live": true,
"has_unpublished_changes": false,
"url_path": "/global/site/clubs/",
"url_path_fr": "/global/site/clubs/",
"url_path_en": "/global/site/clubs/",
"owner": [
"root"
],
"seo_title": "",
"seo_title_fr": null,
"seo_title_en": null,
"show_in_menus": true,
"search_description": "",
"search_description_fr": "",
"search_description_en": "",
"go_live_at": null,
"expire_at": null,
"expired": false,
"locked": false,
"first_published_at": "2019-02-04T21:44:23.382Z",
"last_published_at": "2019-02-04T21:44:23.382Z",
"latest_revision_created_at": null,
"live_revision": null
}
},
{
"model": "wagtailcore.page",
"pk": 33,
"fields": {
"path": "00010001000200030001",
"depth": 5,
"numchild": 0,
"title": "Arts Plastiques",
"title_fr": "Arts Plastiques",
"title_en": null,
"draft_title": "Arts Plastiques",
"slug": "arts-plastiques",
"slug_fr": "arts-plastiques",
"slug_en": null,
"content_type": [
"cofcms",
"cofdirectoryentrypage"
],
"live": true,
"has_unpublished_changes": false,
"url_path": "/global/site/clubs/arts-plastiques/",
"url_path_fr": "/global/site/clubs/arts-plastiques/",
"url_path_en": "/global/site/clubs/arts-plastiques/",
"owner": [
"root"
],
"seo_title": "",
"seo_title_fr": null,
"seo_title_en": null,
"show_in_menus": false,
"search_description": "",
"search_description_fr": "",
"search_description_en": "",
"go_live_at": null,
"expire_at": null,
"expired": false,
"locked": false,
"first_published_at": "2019-02-04T21:48:58.013Z",
"last_published_at": "2019-02-04T21:48:58.013Z",
"latest_revision_created_at": null,
"live_revision": null
}
},
{
"model": "wagtailcore.collection",
"pk": 3,
"fields": {
"path": "00010002",
"depth": 2,
"numchild": 0,
"name": "COF"
}
},
{
"model": "cofcms.cofrootpage",
"pk": 27,
"fields": {
"introduction": "<p>Bienvenue sur le site du COF !</p>",
"introduction_fr": "<p>Bienvenue sur le site du COF !</p>",
"introduction_en": "<p></p>"
}
},
{
"model": "cofcms.cofpage",
"pk": 28,
"fields": {
"body": "[{\"type\": \"paragraph\", \"id\": \"0b3a92bd-1e27-433b-842c-ab4f0a2750ad\", \"value\": \"<p>On est le COF on est tout gentil</p>\"}]",
"body_fr": "[{\"type\": \"paragraph\", \"id\": \"0b3a92bd-1e27-433b-842c-ab4f0a2750ad\", \"value\": \"<p>On est le COF on est tout gentil</p>\"}]",
"body_en": "[]"
}
},
{
"model": "cofcms.cofactuindexpage",
"pk": 29,
"fields": {}
},
{
"model": "cofcms.cofactupage",
"pk": 30,
"fields": {
"chapo": "Grosse teuf en K-F\u00eat",
"chapo_fr": "Grosse teuf en K-F\u00eat",
"chapo_en": "Big typar in K-F\u00eat",
"body": "<p>Viens boire en K-F\u00eat</p>",
"body_fr": "<p>Viens boire en K-F\u00eat</p>",
"body_en": "<p></p>",
"image": 34,
"is_event": true,
"date_start": "2019-02-07T21:00:00Z",
"date_end": "2019-02-08T03:00:00Z",
"all_day": false
}
},
{
"model": "cofcms.cofactupage",
"pk": 31,
"fields": {
"chapo": "",
"chapo_fr": "",
"chapo_en": "",
"body": "<p>C&#x27;est l&#x27;art</p>",
"body_fr": "<p>C&#x27;est l&#x27;art</p>",
"body_en": "<p></p>",
"image": 37,
"is_event": true,
"date_start": "2019-03-16T21:05:00Z",
"date_end": "2019-03-24T21:05:00Z",
"all_day": true
}
},
{
"model": "cofcms.cofdirectorypage",
"pk": 32,
"fields": {
"introduction": "<p>Ce sont les clubs</p>",
"introduction_fr": "<p>Ce sont les clubs</p>",
"introduction_en": "<p></p>",
"alphabetique": true
}
},
{
"model": "cofcms.cofdirectoryentrypage",
"pk": 33,
"fields": {
"body": "<p>Club Arts Plastiques</p>",
"body_fr": "<p>Club Arts Plastiques</p>",
"body_en": "<p></p>",
"links": "[{\"type\": \"contact\", \"id\": \"cf198b98-0b84-4f38-ac00-6d883cfd60a4\", \"value\": {\"email\": \"artsplastiques@ens.fr\", \"texte\": \"Liste Mails\"}}]",
"links_fr": "[{\"type\": \"contact\", \"id\": \"cf198b98-0b84-4f38-ac00-6d883cfd60a4\", \"value\": {\"email\": \"artsplastiques@ens.fr\", \"texte\": \"Liste Mails\"}}]",
"links_en": "[]",
"image": 37
}
},
{
"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,
"file_hash": ""
}
},
{
"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,
"file_hash": ""
}
},
{
"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,
"file_hash": ""
}
},
{
"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,
"file_hash": ""
}
},
{
"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,
"file_hash": ""
}
},
{
"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,
"file_hash": ""
}
},
{
"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,
"file_hash": ""
}
},
{
"model": "wagtailmenus.flatmenuitem",
"pk": 7,
"fields": {
"sort_order": 0,
"link_page": null,
"link_url": "https://www.cof.ens.fr/bda/",
"url_append": "",
"handle": "",
"link_text": "BdA",
"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/",
"url_append": "",
"handle": "",
"link_text": "BdS",
"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",
"url_append": "",
"handle": "",
"link_text": "GestioCOF",
"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",
"url_append": "",
"handle": "",
"link_text": "Le BOcal",
"allow_subnav": false,
"menu": 2
}
},
{
"model": "wagtailmenus.flatmenuitem",
"pk": 11,
"fields": {
"sort_order": 4,
"link_page": null,
"link_url": "https://photos.cof.ens.fr/",
"url_append": "",
"handle": "",
"link_text": "Serveur photos",
"allow_subnav": false,
"menu": 2
}
},
{
"model": "wagtailmenus.flatmenuitem",
"pk": 12,
"fields": {
"sort_order": 5,
"link_page": null,
"link_url": "https://www.eleves.ens.fr",
"url_append": "",
"handle": "",
"link_text": "Services \u00e9l\u00e8ves ENS",
"allow_subnav": false,
"menu": 2
}
},
{
"model": "wagtailmenus.flatmenuitem",
"pk": 20,
"fields": {
"sort_order": 0,
"link_page": 28,
"link_url": null,
"url_append": "",
"handle": "",
"link_text": "",
"allow_subnav": false,
"menu": 4
}
},
{
"model": "wagtailmenus.flatmenuitem",
"pk": 21,
"fields": {
"sort_order": 1,
"link_page": 29,
"link_url": null,
"url_append": "",
"handle": "",
"link_text": "",
"allow_subnav": false,
"menu": 4
}
},
{
"model": "wagtailmenus.flatmenuitem",
"pk": 22,
"fields": {
"sort_order": 2,
"link_page": 32,
"link_url": null,
"url_append": "",
"handle": "",
"link_text": "",
"allow_subnav": false,
"menu": 4
}
},
{
"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": 4,
"fields": {
"site": [
"localhost",
8000
],
"title": "COF - liens internes",
"handle": "cof-nav-int",
"heading": "",
"max_levels": 1,
"use_specific": 1
}
}
]

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -8,7 +8,7 @@ class Command(BaseCommand):
help = "Importe des données pour Wagtail" help = "Importe des données pour Wagtail"
def add_arguments(self, parser): def add_arguments(self, parser):
parser.add_argument("--file", default="kfet_wagtail_17_05") parser.add_argument("--file", default="kfet_wagtail_02_19")
def handle(self, *args, **options): def handle(self, *args, **options):
@ -20,7 +20,9 @@ class Command(BaseCommand):
Group.objects.filter(name__in=("Moderators", "Editors")).delete() Group.objects.filter(name__in=("Moderators", "Editors")).delete()
try: try:
homepage = Page.objects.get(title="Welcome to your new Wagtail site!") homepage = Page.objects.get(pk=2)
print("home page", homepage.title)
if "Welcome" in homepage.title and "Wagtail" in homepage.title:
homepage.delete() homepage.delete()
Site.objects.filter(root_page=homepage).delete() Site.objects.filter(root_page=homepage).delete()
except Page.DoesNotExist: except Page.DoesNotExist:

View file

@ -5,6 +5,7 @@ set -e
python manage.py migrate python manage.py migrate
python manage.py sync_page_translation_fields python manage.py sync_page_translation_fields
python manage.py update_translation_fields
python manage.py loaddata gestion sites articles python manage.py loaddata gestion sites articles
python manage.py loaddevdata python manage.py loaddevdata
python manage.py syncmails gestioncof/management/data/custommail.json python manage.py syncmails gestioncof/management/data/custommail.json