diff --git a/cdhweb/pages/fixtures/sample_pages.json b/cdhweb/pages/fixtures/sample_pages.json deleted file mode 100644 index 8a3288520..000000000 --- a/cdhweb/pages/fixtures/sample_pages.json +++ /dev/null @@ -1,112 +0,0 @@ -[ - { - "model": "wagtailcore.page", - "pk": 1, - "fields": { - "path": "0001", - "depth": 1, - "numchild": 1, - "title": "Root", - "draft_title": "Root", - "slug": "root", - "content_type": ["wagtailcore", "page"], - "live": true, - "has_unpublished_changes": false, - "url_path": "/", - "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, - "last_published_at": null, - "latest_revision_created_at": null, - "live_revision": null - } - }, - { - "model": "wagtailcore.page", - "pk": 2, - "fields": { - "path": "00010001", - "depth": 2, - "numchild": 1, - "title": "Home", - "draft_title": "Home", - "slug": "home", - "content_type": ["cdhpages", "homepage"], - "live": true, - "has_unpublished_changes": false, - "url_path": "/home/", - "owner": null, - "seo_title": "", - "show_in_menus": true, - "search_description": "", - "go_live_at": null, - "expire_at": null, - "expired": false, - "locked": false, - "first_published_at": null, - "last_published_at": null, - "latest_revision_created_at": null, - "live_revision": null - } - }, - { - "model": "wagtailcore.page", - "pk": 3, - "fields": { - "path": "000100010001", - "depth": 3, - "numchild": 0, - "title": "Research", - "draft_title": "Research", - "slug": "research", - "content_type": ["cdhpages", "landingpage"], - "live": true, - "has_unpublished_changes": false, - "url_path": "/home/research/", - "owner": null, - "seo_title": "", - "show_in_menus": true, - "search_description": "", - "go_live_at": null, - "expire_at": null, - "expired": false, - "locked": false, - "first_published_at": null, - "last_published_at": null, - "latest_revision_created_at": null, - "live_revision": null - } - }, - { - "model": "cdhpages.homepage", - "pk": 2, - "fields": { - "body": "[]" - } - }, - { - "model": "cdhpages.landingpage", - "pk": 3, - "fields": { - "tagline": "Establishing best practices in technical research and design", - "body": "[]", - "header_image": null - } - }, - { - "model": "wagtailcore.site", - "fields": { - "hostname": "localhost", - "port": 8000, - "site_name": "test", - "root_page": 2, - "is_default_site": true - } - } -] \ No newline at end of file diff --git a/cdhweb/pages/wagtail_hooks.py b/cdhweb/pages/wagtail_hooks.py deleted file mode 100644 index 66259edc3..000000000 --- a/cdhweb/pages/wagtail_hooks.py +++ /dev/null @@ -1,34 +0,0 @@ -import wagtail.admin.rich_text.editors.draftail.features as draftail_features -from wagtail.admin.rich_text.converters.html_to_contentstate import \ - BlockElementHandler -from wagtail.core import hooks - -# blockquote registration example taken from: -# http://docs.wagtail.io/en/v2.4/advanced_topics/customisation/extending_draftail.html#creating-new-blocks - -@hooks.register('register_rich_text_features') -def register_blockquote_feature(features): - """ - Registering the `blockquote` feature, which uses the `blockquote` Draft.js block type, - and is stored as HTML with a `
` tag. - """ - feature_name = 'blockquote' - type_ = 'blockquote' - tag = 'blockquote' - - control = { - 'type': type_, - 'label': '❝', - 'description': 'Blockquote', - # Optionally, we can tell Draftail what element to use when displaying those blocks in the editor. - 'element': 'blockquote', - } - - features.register_editor_plugin( - 'draftail', feature_name, draftail_features.BlockFeature(control) - ) - - features.register_converter_rule('contentstate', feature_name, { - 'from_database_format': {tag: BlockElementHandler(type_)}, - 'to_database_format': {'block_map': {type_: tag}}, - })