Closed pydolan closed 5 years ago
Add a line for Django 2.2 in tox.ini and go from there (see my explanations in #93). That should work.
The Django version specified in requirements.txt, which is used by setup.py is really just for saying, "Hey, use an older version of behave-django for older Djangos" (for people reading source code). We should probably remove it or make it a soft-dependency with setuptools. -- This is the usual, and actually relevant, debate about including dependencies in Python packages.
Thanks for reporting that this is actually an issue!
This should work now when you run behave-django off the master
branch.
Can you explain this
There was a release on April 16, 2019 (v1.3.0), which includes the fix to the test project that was added on April 04, 2019 (see link above).
1) Go to settings.py of your project
2) Cut these three lines from MIDDLEWARE_CLASSES :
'django.contrib.sessions.middleware.SessionMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
3) Now paste the code given below right after MIDDLEWARE_CLASSES :
MIDDLEWARE = [ 'django.contrib.sessions.middleware.SessionMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', ]
@adnanrizwee I'm not sure I understand: You're using both the MIDDLEWARE_CLASSES
and the MIDDLEWARE
in your Django settings together? Do you have a specific reason for that? And which Django version do you run?
When setting up my test environment to run tests, pip installed Django 2.2 (since the requirements are for Django >= 1.11). When running the tests, Django errors about several settings being defined incorrectly.
I'll push up a PR shortly