浏览代码

Upgrade to Wagtail 2.16, Django 4.0

Matt Westcott 3 年之前
父节点
当前提交
e94bfbbc99

+ 1 - 0
bakerydemo/base/management/commands/load_initial_data.py

@@ -39,5 +39,6 @@ class Command(BaseCommand):
             Page.objects.get(title='Welcome to your new Wagtail site!').delete()
 
         call_command('loaddata', fixture_file, verbosity=0)
+        call_command('update_index', verbosity=0)
 
         print("Awesome. Your data is loaded! The bakery's doors are almost ready to open...")

+ 1 - 1
bakerydemo/settings/base.py

@@ -176,7 +176,7 @@ GOOGLE_MAP_API_KEY = 'AIzaSyD31CT9P9KxvNUJOwDq2kcFEIG8ADgaFgw'
 # Use Elasticsearch as the search backend for extra performance and better search results
 WAGTAILSEARCH_BACKENDS = {
     'default': {
-        'BACKEND': 'wagtail.search.backends.db',
+        'BACKEND': 'wagtail.search.backends.database',
         'INDEX': 'bakerydemo',
     },
 }

+ 1 - 1
bakerydemo/settings/dev.py

@@ -7,4 +7,4 @@ EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'
 # BASE_URL required for notification emails
 BASE_URL = 'http://localhost:8000'
 
-ALLOWED_HOSTS = '*'
+ALLOWED_HOSTS = ['*']

+ 2 - 2
requirements/base.txt

@@ -1,5 +1,5 @@
-Django>=3.2,<3.3
+Django>=4.0,<4.1
 django-dotenv==1.4.1
-wagtail>=2.14,<2.15
+wagtail>=2.16,<2.17
 wagtailfontawesome>=1.1.3,<1.2
 django-debug-toolbar>=3.2,<4