Skip to content

Commit 2f5a63e

Browse files
committed
rename wagtail_xmlimport to wagtail_wordpress_import
1 parent cba0a57 commit 2f5a63e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+69
-69
lines changed

.circleci/config.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ jobs:
77
steps:
88
- checkout
99
- run: pip install flake8
10-
- run: flake8 wagtail_xmlimport
10+
- run: flake8 wagtail_wordpress_import
1111

1212
prettier:
1313
docker:

.coveragerc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[run]
22
branch = True
3-
include = wagtail_xmlimport/*
3+
include = wagtail_wordpress_import/*
44
omit = */migrations/*,*/tests/*
55

66
[report]

.github/workflows/test.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -63,5 +63,5 @@ jobs:
6363
run: |
6464
tox
6565
env:
66-
DATABASE_URL: postgres://postgres:postgres@localhost:5432/wagtail_xmlimport
66+
DATABASE_URL: postgres://postgres:postgres@localhost:5432/wagtail_wordpress_import
6767
TOXENV: python${{ matrix.python }}-django${{ matrix.django }}-wagtail${{ matrix.wagtail }}-postgres

.gitignore

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
*.pyc
22
/build
33
/dist
4-
/wagtail_xmlimport.egg-info
4+
/wagtail_wordpress_import.egg-info
55
/.coverage
66
/htmlcov
77
/.tox
88
/venv
99
/.vscode
1010
/site
11-
/test_wagtail_xmlimport.db
11+
/test_wagtail_wordpress_import.db
1212
/node_modules
1313
/test-static
1414
/test-media
15-
.DS_Store
15+
.DS_Store

MANIFEST.in

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
include LICENSE *.rst *.txt *.md
2-
graft wagtail_xmlimport
2+
graft wagtail_wordpress_import
33
global-exclude __pycache__
44
global-exclude *.py[co]

README.md

+4-4

package.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
"name": "wagtail-xmlimport",
33
"version": "1.0.0",
44
"description": "",
5-
"main": "wagtail_xmlimport/static_src/main.tsx",
5+
"main": "wagtail_wordpress_import/static_src/main.tsx",
66
"scripts": {
77
"build": "webpack --mode=production",
88
"start": "webpack --mode=development --watch",
9-
"format": "prettier --write wagtail_xmlimport/**/*.{ts,tsx,scss}",
10-
"lint": "prettier --check wagtail_xmlimport/**/*.{ts,tsx,scss}"
9+
"format": "prettier --write wagtail_wordpress_import/**/*.{ts,tsx,scss}",
10+
"lint": "prettier --check wagtail_wordpress_import/**/*.{ts,tsx,scss}"
1111
},
1212
"author": "",
1313
"license": "ISC",

setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
from setuptools import find_packages, setup
66

7-
from wagtail_xmlimport import __version__
7+
from wagtail_wordpress_import import __version__
88

99

1010
this_directory = path.abspath(path.dirname(__file__))

testmanage.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
from django.core.management import execute_from_command_line
1010

1111

12-
os.environ["DJANGO_SETTINGS_MODULE"] = "wagtail_xmlimport.test.settings"
12+
os.environ["DJANGO_SETTINGS_MODULE"] = "wagtail_wordpress_import.test.settings"
1313

1414

1515
def make_parser():

tox.ini

+2-2
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,9 @@ deps =
3737
postgres: psycopg2>=2.8,<2.9
3838

3939
setenv =
40-
postgres: DATABASE_URL={env:DATABASE_URL:postgres:///wagtail_xmlimport}
40+
postgres: DATABASE_URL={env:DATABASE_URL:postgres:///wagtail_wordpress_import}
4141

4242
[testenv:flake8]
4343
basepython=python3.7
4444
deps=flake8>=2.2.0
45-
commands=flake8 wagtail_xmlimport
45+
commands=flake8 wagtail_wordpress_import

tsconfig.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"esModuleInterop": true
1010
},
1111
"files": [
12-
"wagtail_xmlimport/static_src/main.tsx",
13-
"wagtail_xmlimport/static_src/custom.d.ts"
12+
"wagtail_wordpress_import/static_src/main.tsx",
13+
"wagtail_wordpress_import/static_src/custom.d.ts"
1414
]
1515
}

wagtail_wordpress_import/__init__.py

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
default_app_config = "wagtail_wordpress_import.apps.WagtailXmlimportAppConfig"
2+
3+
4+
VERSION = (0, 1, 0)
5+
__version__ = ".".join(map(str, VERSION))
File renamed without changes.
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from django.apps import AppConfig
22

33
class WagtailXmlimportAppConfig(AppConfig):
4-
label = "wagtail_xmlimport"
5-
name = "wagtail_xmlimport"
4+
label = "wagtail_wordpress_import"
5+
name = "wagtail_wordpress_import"
66
verbose_name = "Wagtail xmlimport"

wagtail_xmlimport/bleach.py wagtail_wordpress_import/bleach.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
from bs4 import BeautifulSoup as bs4
2-
from wagtail_xmlimport.constants import (
2+
from wagtail_wordpress_import.constants import (
33
ALLOWED_TAGS,
44
ALLOWED_STYLES,
55
ALLOWED_ATTRIBUTES,
@@ -15,7 +15,7 @@ def bleach_clean(value):
1515
"""
1616
Clean up the raw html to be on the safe side.
1717
Keeping all styles in place that we know of and care about.
18-
See ALLOWED lists in wagtail-xmlimport/wagtail_xmlimport/constants.py
18+
See ALLOWED lists in wagtail-xmlimport/wagtail_wordpress_import/constants.py
1919
"""
2020

2121
cleaned = Cleaner(
File renamed without changes.

wagtail_xmlimport/blocks.py wagtail_wordpress_import/blocks.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class HeadingBlock(blocks.StructBlock):
1818

1919
class Meta:
2020
icon = "title"
21-
template = "wagtail_xmlimport/heading_block.html"
21+
template = "wagtail_wordpress_import/heading_block.html"
2222

2323

2424
class ImageBlock(blocks.StructBlock):
@@ -27,7 +27,7 @@ class ImageBlock(blocks.StructBlock):
2727

2828
class Meta:
2929
icon = "image"
30-
template = "wagtail_xmlimport/image_block.html"
30+
template = "wagtail_wordpress_import/image_block.html"
3131

3232

3333
class QuoteBlock(blocks.StructBlock):
@@ -36,7 +36,7 @@ class QuoteBlock(blocks.StructBlock):
3636

3737
class Meta:
3838
icon = "openquote"
39-
template = "wagtail_xmlimport/quote_block.html"
39+
template = "wagtail_wordpress_import/quote_block.html"
4040

4141

4242
class WPImportStreamBlocks(blocks.StreamBlock):
File renamed without changes.

wagtail_xmlimport/cls/page_builder.py wagtail_wordpress_import/cls/page_builder.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
from django.apps import apps
88
from django.utils.text import slugify
99
from django.utils.timezone import make_aware
10-
from wagtail_xmlimport.functions import linebreaks_wp
10+
from wagtail_wordpress_import.functions import linebreaks_wp
1111

1212

1313
class PageBuilder:

wagtail_xmlimport/cls/page_maker.py wagtail_wordpress_import/cls/page_maker.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
from django.apps import apps
88
from django.utils.text import slugify
99
from django.utils.timezone import make_aware
10-
from wagtail_xmlimport.functions import linebreaks_wp
10+
from wagtail_wordpress_import.functions import linebreaks_wp
1111

1212

1313
class PageMaker:
File renamed without changes.
File renamed without changes.

wagtail_xmlimport/cls/xml_importer.py wagtail_wordpress_import/cls/xml_importer.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
from xml.dom import pulldom
44

55
from wagtail.core.models import Page
6-
from wagtail_xmlimport.cls.page_builder import PageBuilder
7-
from wagtail_xmlimport.functions import node_to_dict
6+
from wagtail_wordpress_import.cls.page_builder import PageBuilder
7+
from wagtail_wordpress_import.functions import node_to_dict
88

99

1010
class XmlImporter:
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from django.apps import AppConfig
22

33
class WagtailXmlimportImportersConfig(AppConfig):
4-
label = "wagtail_xmlimport_importers"
5-
name = "wagtail_xmlimport_importers"
4+
label = "wagtail_wordpress_import_importers"
5+
name = "wagtail_wordpress_import_importers"
66
verbose_name = "Wagtail xmlimport importers"

wagtail_xmlimport/importers/wordpress.py wagtail_wordpress_import/importers/wordpress.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@
77
from django.utils.timezone import make_aware
88
from wagtail.core import blocks
99
from wagtail.core.models import Page
10-
from wagtail_xmlimport.bleach import bleach_clean, fix_styles
11-
from wagtail_xmlimport.block_builder import BlockBuilder
12-
from wagtail_xmlimport.functions import linebreaks_wp, node_to_dict
13-
from wagtail_xmlimport.importers import wordpress_mapping
10+
from wagtail_wordpress_import.bleach import bleach_clean, fix_styles
11+
from wagtail_wordpress_import.block_builder import BlockBuilder
12+
from wagtail_wordpress_import.functions import linebreaks_wp, node_to_dict
13+
from wagtail_wordpress_import.importers import wordpress_mapping
1414

1515

1616
class WordpressImporter:

wagtail_xmlimport/management/commands/analyze_html_content.py wagtail_wordpress_import/management/commands/analyze_html_content.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
from django.core.management.base import BaseCommand
44
from prettytable import PrettyTable
55

6-
from wagtail_xmlimport.importers.wordpress import WordpressImporter
7-
from wagtail_xmlimport.analysis import HTMLAnalyzer
6+
from wagtail_wordpress_import.importers.wordpress import WordpressImporter
7+
from wagtail_wordpress_import.analysis import HTMLAnalyzer
88

99

1010
class Command(BaseCommand):

wagtail_xmlimport/management/commands/extract_xml_mapping.py wagtail_wordpress_import/management/commands/extract_xml_mapping.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import os
33

44
from django.core.management.base import BaseCommand
5-
from wagtail_xmlimport.cls.util import PathsToDict
5+
from wagtail_wordpress_import.cls.util import PathsToDict
66

77

88
class Command(BaseCommand):

wagtail_xmlimport/management/commands/import_xml.py wagtail_wordpress_import/management/commands/import_xml.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
from datetime import datetime
44

55
from django.core.management.base import BaseCommand
6-
from wagtail_xmlimport.importers.wordpress import WordpressImporter
6+
from wagtail_wordpress_import.importers.wordpress import WordpressImporter
77

88
LOG_DIR = "log"
99

File renamed without changes.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
default_app_config = "wagtail_wordpress_import.test.apps.WagtailXmlimportTestAppConfig"

wagtail_xmlimport/test/apps.py wagtail_wordpress_import/test/apps.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22

33

44
class WagtailXmlimportTestAppConfig(AppConfig):
5-
label = "wagtail_xmlimport_test"
6-
name = "wagtail_xmlimport.test"
5+
label = "wagtail_wordpress_import_test"
6+
name = "wagtail_wordpress_import.test"
77
verbose_name = "Wagtail xmlimport tests"

wagtail_xmlimport/test/settings.py wagtail_wordpress_import/test/settings.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@
3333
# Application definition
3434

3535
INSTALLED_APPS = [
36-
"wagtail_xmlimport",
37-
"wagtail_xmlimport.test",
36+
"wagtail_wordpress_import",
37+
"wagtail_wordpress_import.test",
3838
"wagtail.contrib.search_promotions",
3939
"wagtail.contrib.forms",
4040
"wagtail.contrib.redirects",
@@ -73,7 +73,7 @@
7373
"wagtail.contrib.redirects.middleware.RedirectMiddleware",
7474
]
7575

76-
ROOT_URLCONF = "wagtail_xmlimport.test.urls"
76+
ROOT_URLCONF = "wagtail_wordpress_import.test.urls"
7777

7878
TEMPLATES = [
7979
{
@@ -111,7 +111,7 @@
111111
# https://docs.djangoproject.com/en/1.10/ref/settings/#databases
112112

113113
DATABASES = {
114-
"default": dj_database_url.config(default="sqlite:///test_wagtail_xmlimport.db"),
114+
"default": dj_database_url.config(default="sqlite:///test_wagtail_wordpress_import.db"),
115115
}
116116

117117

wagtail_xmlimport/test/tests/test_bleach.py wagtail_wordpress_import/test/tests/test_bleach.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
from django.test import TestCase
44

5-
from wagtail_xmlimport.functions import linebreaks_wp
6-
from wagtail_xmlimport.bleach import bleach_clean, fix_styles
5+
from wagtail_wordpress_import.functions import linebreaks_wp
6+
from wagtail_wordpress_import.bleach import bleach_clean, fix_styles
77

88
BASE_PATH = os.path.dirname(os.path.dirname(__file__))
99
FIXTURES_PATH = BASE_PATH + "/test_fixtures"
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
from django.test import TestCase
2-
from wagtail_xmlimport.block_builder import check_image_src
2+
from wagtail_wordpress_import.block_builder import check_image_src
33

44
class TestBlockBuilder(TestCase):
55

@@ -8,4 +8,4 @@ def test_check_image_src(self):
88
src2 = "folder/myimage.gif"
99

1010
self.assertEqual(check_image_src(src1), "https://www.budgetsaresexy.com/folder/myimage.gif")
11-
self.assertEqual(check_image_src(src2), "https://www.budgetsaresexy.com/folder/myimage.gif")
11+
self.assertEqual(check_image_src(src2), "https://www.budgetsaresexy.com/folder/myimage.gif")

wagtail_xmlimport/test/tests/test_commands.py wagtail_wordpress_import/test/tests/test_commands.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
from django.test import TestCase
2-
from wagtail_xmlimport.management.commands import import_xml
3-
from wagtail_xmlimport.management.commands.import_xml import Command as RunCmd
4-
from wagtail_xmlimport.management.commands.reduce_xml import Command as ReduceCmd
5-
from wagtail_xmlimport.management.commands.extract_xml_mapping import Command as DiscoveryCmd
2+
from wagtail_wordpress_import.management.commands import import_xml
3+
from wagtail_wordpress_import.management.commands.import_xml import Command as RunCmd
4+
from wagtail_wordpress_import.management.commands.reduce_xml import Command as ReduceCmd
5+
from wagtail_wordpress_import.management.commands.extract_xml_mapping import Command as DiscoveryCmd
66

77

88
class TestRunXmlCommand(TestCase):

wagtail_xmlimport/test/tests/test_importer.py wagtail_wordpress_import/test/tests/test_importer.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import json
22
from datetime import datetime
33
from django.test import TestCase
4-
from wagtail_xmlimport.importers import wordpress_mapping
5-
from wagtail_xmlimport.importers.wordpress import WordpressImporter
4+
from wagtail_wordpress_import.importers import wordpress_mapping
5+
from wagtail_wordpress_import.importers.wordpress import WordpressImporter
66

77

88
class ImpoterTests(TestCase):

wagtail_xmlimport/test/tests/test_util.py wagtail_wordpress_import/test/tests/test_util.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
from django.test import TestCase
44
from lxml import etree
55

6-
from wagtail_xmlimport.cls.util import MaxDepthEtree, PathsToDict
6+
from wagtail_wordpress_import.cls.util import MaxDepthEtree, PathsToDict
77

88
FIXTURES_DIR = os.path.dirname(
99
os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
File renamed without changes.

wagtail_xmlimport/wagtail_hooks.py wagtail_wordpress_import/wagtail_hooks.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ def register_admin_urls():
88
urls = [
99
path(
1010
"jsi18n/",
11-
JavaScriptCatalog.as_view(packages=["wagtail_xmlimport"]),
11+
JavaScriptCatalog.as_view(packages=["wagtail_wordpress_import"]),
1212
name="javascript_catalog",
1313
),
1414
# Add your other URLs here, and they will appear under `/admin/xmlimport/`
@@ -19,8 +19,8 @@ def register_admin_urls():
1919
path(
2020
"xmlimport/",
2121
include(
22-
(urls, "wagtail_xmlimport"),
23-
namespace="wagtail_xmlimport",
22+
(urls, "wagtail_wordpress_import"),
23+
namespace="wagtail_wordpress_import",
2424
),
2525
)
2626
]

0 commit comments

Comments
 (0)