From 7f2882ce0e22a7c9e162868fd4da70ee4013edb0 Mon Sep 17 00:00:00 2001 From: Jasper Berghoef Date: Thu, 1 Jun 2017 16:57:40 +0200 Subject: [PATCH] Adds sandbox example data for personalisation --- Makefile | 3 +- sandbox/exampledata/personalisation.json | 100 +++++++++++++++++++++++ 2 files changed, 102 insertions(+), 1 deletion(-) create mode 100644 sandbox/exampledata/personalisation.json diff --git a/Makefile b/Makefile index 6bdc4cc..4ca99e5 100644 --- a/Makefile +++ b/Makefile @@ -43,5 +43,6 @@ dist: sandbox: pip install -r sandbox/requirements.txt sandbox/manage.py migrate - sandbox/manage.py loaddata sandbox/exampledata/users.json + sandbox/manage.py loaddata sandbox/exampledata/users.json + sandbox/manage.py loaddata sandbox/exampledata/personalisation.json sandbox/manage.py runserver diff --git a/sandbox/exampledata/personalisation.json b/sandbox/exampledata/personalisation.json new file mode 100644 index 0000000..c0f7d56 --- /dev/null +++ b/sandbox/exampledata/personalisation.json @@ -0,0 +1,100 @@ +[{ + "model": "wagtail_personalisation.visitcountrule", + "pk": 1, + "fields": { + "segment": 1, + "operator": "more_than", + "count": 3, + "counted_page": 3 + } +}, { + "model": "wagtail_personalisation.segment", + "pk": 1, + "fields": { + "name": "Returning Rook", + "create_date": "2017-06-01T14:24:17.309Z", + "edit_date": "2017-06-01T14:24:17.309Z", + "enable_date": "2017-06-01T14:34:59.243Z", + "disable_date": null, + "visit_count": 3, + "status": "enabled", + "persistent": false, + "match_any": false + } +}, { + "model": "wagtail_personalisation.personalisablepagemetadata", + "pk": 1, + "fields": { + "canonical_page": 3, + "variant": 3, + "segment": null + } +}, { + "model": "wagtail_personalisation.personalisablepagemetadata", + "pk": 2, + "fields": { + "canonical_page": 3, + "variant": 4, + "segment": 1 + } +}, { + "model": "home.homepage", + "pk": 3, + "fields": { + "text_content": "

Thank you for trying Wagxperience!

" + } +}, { + "model": "home.homepage", + "pk": 4, + "fields": { + "text_content": "

Thank you for trying Wagxperience!

You've visited the homepage more than 3 times!

" + } +}, { + "model": "wagtailcore.page", + "pk": 3, + "fields": { + "path": "00010001", + "depth": 2, + "numchild": 0, + "title": "Home", + "slug": "home", + "content_type": 2, + "live": true, + "has_unpublished_changes": false, + "url_path": "/home/", + "owner": null, + "seo_title": "", + "show_in_menus": false, + "search_description": "", + "go_live_at": null, + "expire_at": null, + "expired": false, + "locked": false, + "first_published_at": null, + "latest_revision_created_at": null + } +}, { + "model": "wagtailcore.page", + "pk": 4, + "fields": { + "path": "00010002", + "depth": 2, + "numchild": 0, + "title": "Home (Returning Rook)", + "slug": "home-returning-rook", + "content_type": 2, + "live": true, + "has_unpublished_changes": false, + "url_path": "/home-returning-rook/", + "owner": null, + "seo_title": "", + "show_in_menus": false, + "search_description": "", + "go_live_at": null, + "expire_at": null, + "expired": false, + "locked": false, + "first_published_at": "2017-06-01T14:53:44.441Z", + "latest_revision_created_at": "2017-06-01T14:53:44.312Z" + } +}]