Closed chromakey closed 8 years ago
The requirements file on the master branch currently lists Django==1.10.1 so I think it shouldn't be a 1.9.x issue here?
@chromakey is a new project? I'm trying to reproduce the error based on your cookiecutter configs.
to the error described occurs, which command you executed?
Brand new project. Created it running this:
cookiecutter https://github.com/pydanny/cookiecutter-django
After installing the requirements and doing the migration, I ran the project with this
python manage.py runserver
PostgreSQL database if it matters.
@chromakey Are you in a virtualenv and could you run:
pip list
Ubuntu 16.04 with Python 3.5.2 if either matters.
alabaster (0.7.9)
awesome-slugify (1.6.5)
Babel (2.3.4)
coverage (4.2)
decorator (4.0.10)
defusedxml (0.4.1)
Django (1.10.1)
django-allauth (0.27.0)
django-braces (1.9.0)
django-coverage-plugin (1.3.1)
django-crispy-forms (1.6.0)
django-debug-toolbar (1.5)
django-environ (0.4.0)
django-extensions (1.7.4)
django-model-utils (2.6)
django-redis (4.5.0)
django-test-plus (1.0.15)
docutils (0.12)
factory-boy (2.7.0)
fake-factory (0.7.2)
imagesize (0.7.1)
ipdb (0.10.1)
ipython (5.1.0)
ipython-genutils (0.1.0)
Jinja2 (2.8)
MarkupSafe (0.23)
oauthlib (2.0.0)
pexpect (4.2.1)
pickleshare (0.7.4)
Pillow (3.3.1)
pip (8.1.2)
pkg-resources (0.0.0)
prompt-toolkit (1.0.7)
psycopg2 (2.6.2)
ptyprocess (0.5.1)
py (1.4.31)
Pygments (2.1.3)
pytest (3.0.2)
pytest-django (3.0.0)
pytest-sugar (0.7.1)
python-dateutil (2.5.3)
python3-openid (3.0.10)
pytz (2016.6.1)
redis (2.10.5)
regex (2016.9.22)
requests (2.11.1)
requests-oauthlib (0.7.0)
setuptools (28.0.0)
simplegeneric (0.8.1)
six (1.10.0)
snowballstemmer (1.2.1)
Sphinx (1.4.6)
sqlparse (0.2.1)
termcolor (1.1.0)
traitlets (4.3.1)
Unidecode (0.4.19)
wcwidth (0.1.7)
Werkzeug (0.11.11)
wheel (0.29.0)
That looks right.
I got this on migration (running on py2.7, but said "use python3: y" as @chromakey did.
I know that's wrong, but it happened...
System check identified some issues:
WARNINGS:
?: (1_10.W001) The MIDDLEWARE_CLASSES setting is deprecated in Django 1.10 and the MIDDLEWARE setting takes precedence. Since you've set MIDDLEWARE, the value of MIDDLEWARE_CLASSES is ignored.
And, I got the same load_middleware
exception as @chromakey did.
I received that warning as well @ssteinerx but I didn't include it in the traceback.
Is there both a MIDDLEWARE
and MIDDLEWARE_CLASSES
being pulled in?
That doesn't explain the exception (I don't think?), but we shouldn't have both in any case as MIDDLEWARE_CLASSES
will be ignored.
@chromakey @jayfk I can confirm the error.
There does not seem to be an instance of MIDDLEWARE_CLASSES
in the generated app:
find . -name "*.py" -exec grep "MIDDLEWARE" {} \; -print
# MIDDLEWARE CONFIGURATION
MIDDLEWARE = (
./config/settings/common.py
MIDDLEWARE += ('debug_toolbar.middleware.DebugToolbarMiddleware',)
./config/settings/local.py
MIDDLEWARE = (
) + MIDDLEWARE
./config/settings/production.py
I think I found the issue. It's with django-debug-toolbar. Commenting it out in the configuration seems to get everything to work. I found this recently merged PR:
https://github.com/jazzband/django-debug-toolbar/pull/879
It looks like pypi hasn't been updated yet to reflect the merged changes.
@chromakey please test the branch fix-debug-toolbar-issue-827
git clone -b fix-debug-toolbar-issue-827 --single-branch https://github.com/pydanny/cookiecutter-django.git
cookiecutter cookiecutter-django/
after that, create a new clean virtualenv and load, and inside the created project, run:
pip install -r requirements/local.txt -r requirements/test.txt -r requirements/production.txt
python manage.py migrate
python manage.py runserver
@luzfcb using your instructions above I was able to get it to run successfully with no additional changes.
Generated a brand new project this morning using master. Installed requirements and ran the initial migrations. No changes were made to the generated code. Wondering if this error might be related to this PR which was merged about 10 hours ago: https://github.com/pydanny/cookiecutter-django/pull/793.
Thank you everyone for your work on this great project.
Project Settings: