brunam
brunam

Reputation: 835

Using Wagtail with django 2.0

Wagtail claims to work with django 2.0 on their website but when I install it via

pip install wagtail

uninstalls django 2.0 and installs 1.11. Is there a way to have it work smoothly with new django? Updating django back to 2.0 ends up breaking the site. Here is the code when I attempt to run the server:

Unhandled exception in thread started by <function check_errors.<locals>.wrapper at 0x1061e58c8>
Traceback (most recent call last):
File "/Users/johnbriggs/.virtualenvs/py1/lib/python3.6/site-packages/django/utils/autoreload.py", line 225, in wrapper
fn(*args, **kwargs)
File "/Users/johnbriggs/.virtualenvs/py1/lib/python3.6/site-packages/django/core/management/commands/runserver.py", line 113, in inner_run
autoreload.raise_last_exception()
File "/Users/johnbriggs/.virtualenvs/py1/lib/python3.6/site-packages/django/utils/autoreload.py", line 248, in raise_last_exception
raise _exception[1]
File "/Users/johnbriggs/.virtualenvs/py1/lib/python3.6/site-packages/django/core/management/__init__.py", line 327, in execute
autoreload.check_errors(django.setup)()
File "/Users/johnbriggs/.virtualenvs/py1/lib/python3.6/site-packages/django/utils/autoreload.py", line 225, in wrapper
fn(*args, **kwargs)
File "/Users/johnbriggs/.virtualenvs/py1/lib/python3.6/site-packages/django/__init__.py", line 24, in setup
apps.populate(settings.INSTALLED_APPS)
File "/Users/johnbriggs/.virtualenvs/py1/lib/python3.6/site-packages/django/apps/registry.py", line 112, in populate
app_config.import_models()
File "/Users/johnbriggs/.virtualenvs/py1/lib/python3.6/site-packages/django/apps/config.py", line 198, in import_models
self.models_module = import_module(models_module_name)
File "/Users/johnbriggs/.virtualenvs/py1/lib/python3.6/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 994, in _gcd_import
File "<frozen importlib._bootstrap>", line 971, in _find_and_load
File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 678, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/Users/johnbriggs/Code/Python/wagtailtest/home/models.py", line 5, in <module>
from wagtail.wagtailcore.models import Page
File "/Users/johnbriggs/.virtualenvs/py1/lib/python3.6/site-packages/wagtail/wagtailcore/models.py", line 16, in <module>
from django.core.urlresolvers import reverse
ModuleNotFoundError: No module named 'django.core.urlresolvers'

Upvotes: 1

Views: 484

Answers (2)

FlipperPA
FlipperPA

Reputation: 14311

As of this writing, Wagtail has released a beta which works with Django 2.0, which I've been using successfully. Looking at past releases, I'm guessing it will be a few weeks before the final release is ready, but if you're currently in development, it is probably safe to use:

pip install wagtail==2.0b1

It'll like go to release candidate soon, then full release. Good luck!

Upvotes: 1

LB Ben Johnston
LB Ben Johnston

Reputation: 5176

The current stable version of Wagtail is 1.13.1 - which does not yet support Django 2.0.

http://docs.wagtail.io/en/v1.13.1/

The latest (non-stable) version of Wagtail is still in development but will support Django 2.0.

http://docs.wagtail.io/en/latest/

You may have gone to the /latest docs not the current stable version.

At the moment, Django 2 support is not available on any release that's installable through pip - you'll need to wait for the release of Wagtail 2.0 (hopefully later this month), or try out the development version (http://docs.wagtail.io/en/v1.13.1/contributing/developing.html).

Upvotes: 2

Related Questions