On Mon, 15 Jul 2019, at 21:36, Ehigie Aito wrote:
> Like I said, in older versions of Django, that variable used to be named 
> MIDDLEWARE_CLASSES, if I create a Django project with Python 3.7 and Django 
> 2.2.3, its MIDDLEWARE but Python 3.8 and Django 2.2.3 its named 
> MIDDLEWARE_CLASSES which on running python manage.py runserver fails. Here is 
> the traceback:

So you're saying that "django-admin startproject" will produce a different 
settings file based on the version of Python?

Can you show us a comparison, please?

> Exception in thread django-main-thread:
> Traceback (most recent call last):
>  File "/usr/local/lib/python3.8/threading.py", line 923, in _bootstrap_inner
>  self.run()
>  File "/usr/local/lib/python3.8/threading.py", line 865, in run
>  self._target(*self._args, **self._kwargs)
>  File 
> "/home/pystar/.local/share/virtualenvs/del-wUbba1cG/lib/python3.8/site-packages/django/utils/autoreload.py",
>  line 54, in wrapper
>  fn(*args, **kwargs)
>  File 
> "/home/pystar/.local/share/virtualenvs/del-wUbba1cG/lib/python3.8/site-packages/django/core/management/commands/runserver.py",
>  line 117, in inner_run
>  self.check(display_num_errors=True)
>  File 
> "/home/pystar/.local/share/virtualenvs/del-wUbba1cG/lib/python3.8/site-packages/django/core/management/base.py",
>  line 436, in check
>  raise SystemCheckError(msg)
> django.core.management.base.SystemCheckError: SystemCheckError: System check 
> identified some issues:
> 
> ERRORS:
> ?: (admin.E408) 'django.contrib.auth.middleware.AuthenticationMiddleware' 
> must be in MIDDLEWARE in order to use the admin application.
> ?: (admin.E409) 'django.contrib.messages.middleware.MessageMiddleware' must 
> be in MIDDLEWARE in order to use the admin application.
> ?: (admin.E410) 'django.contrib.sessions.middleware.SessionMiddleware' must 
> be in MIDDLEWARE in order to use the admin application.

This does look troublesome. Can you show the settings file used?

--
C

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/447ea06c-c3d9-43d3-848e-8ba27fd2d8ea%40www.fastmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to