Disable Draftail due to wagtail#4602
This commit is contained in:
parent
eb743bca9c
commit
00d21c840e
2 changed files with 38 additions and 1 deletions
31
feedler/management/commands/invalidpage.py
Normal file
31
feedler/management/commands/invalidpage.py
Normal file
|
@ -0,0 +1,31 @@
|
|||
from django.core.management.base import BaseCommand
|
||||
from django.contrib.auth.models import User
|
||||
from django.test import Client
|
||||
|
||||
from wagtail.core.models import Page
|
||||
from wagtail.admin.views.pages import edit
|
||||
|
||||
# Scans for broken editors, via
|
||||
# https://github.com/wagtail/wagtail/issues/4602
|
||||
|
||||
class Command(BaseCommand):
|
||||
|
||||
def handle(self, **options):
|
||||
invalid_page_ids = []
|
||||
pages = Page.objects.all()
|
||||
client = Client()
|
||||
# use any existing super user account
|
||||
user = User.objects.get(username='oleg')
|
||||
client.force_login(user)
|
||||
|
||||
for page in pages:
|
||||
id = page.id
|
||||
# print statement to assure the script is running
|
||||
print(id)
|
||||
url = f'/cms/pages/{id}/edit/'
|
||||
try:
|
||||
response = client.get(url)
|
||||
except:
|
||||
invalid_pages.append(id)
|
||||
|
||||
print(invalid_page_ids)
|
|
@ -43,7 +43,7 @@ INSTALLED_APPS = [
|
|||
'wagtail.contrib.forms',
|
||||
'wagtail.contrib.redirects',
|
||||
'wagtail.contrib.search_promotions',
|
||||
|
||||
|
||||
'wagtail.embeds',
|
||||
'wagtail.sites',
|
||||
'wagtail.users',
|
||||
|
@ -198,6 +198,12 @@ COMPRESS_PRECOMPILERS = [
|
|||
|
||||
WAGTAIL_SITE_NAME = "Public Health Schweiz"
|
||||
|
||||
WAGTAILADMIN_RICH_TEXT_EDITORS = {
|
||||
'default': {
|
||||
'WIDGET': 'wagtail.admin.rich_text.HalloRichTextArea'
|
||||
}
|
||||
}
|
||||
|
||||
# Puput settings
|
||||
|
||||
PUPUT_AS_PLUGIN = True
|
||||
|
|
Loading…
Reference in a new issue