Closed cryptogun closed 7 years ago
I was not aware of the new middleware. I'll fix it. MIDDLEWARE_CLASSES
will work until Django 2.0, though.
Great. Thanks.
Well, I reinstalled spirit and djconfig and set MIDDLEWARE
only. And found that you forgot to modify this line.
Traceback:
File "/home/i/Desktop/env/lib/python3.5/site-packages/spirit/admin/apps.py", line 15, in ready
self.register_config()
File "/home/i/Desktop/env/lib/python3.5/site-packages/spirit/admin/apps.py", line 21, in register_config
djconfig.register(BasicConfigForm)
File "/home/i/Desktop/env/lib/python3.5/site-packages/djconfig/conf.py", line 53, in _register
self._check_backend()
File "/home/i/Desktop/env/lib/python3.5/site-packages/djconfig/conf.py", line 75, in _check_backend
"djconfig.middleware.DjConfigMiddleware is required "
ValueError: djconfig.middleware.DjConfigMiddleware is required but it was not found in MIDDLEWARE_CLASSES
Dang. I was too lazy to test it, just fixed the fix (and added proper unit tests).
Tested OK. Thanks.
django-djconfig version: 0.5.1 I merged spirit.settings into my settings. When doing
manage.py makemigrations
I got the following warning:And then I changed all
MIDDLEWARE_CLASSES
toMIDDLEWARE
I got the following error:Now my solution is keep both
MIDDLEWARE_CLASSES
andMIDDLEWARE
, and only one item inMIDDLEWARE_CLASSES
.Edit: Now I can't keep both
MIDDLEWARE_CLASSES
andMIDDLEWARE
otherwiseTypeError: object() takes no parameters
would occur (see here), and have to useMIDDLEWARE_CLASSES
only.