'The Connection Admin does not exist

Does anyone know how to resolve this error please? I have checked and the admin site is registered in the URLS file. In all the admin.py files the relevant models are all registered. I have moved django.contrib.auth to the top of my applications in settings.py. I have also dropped and re-created the default database.

Please note I use database routers

ConnectionDoesNotExist at /admin/
The connection admin doesn't exist
Request Method: GET
Request URL:    http://192.168.1.118:9000/admin/
Django Version: 2.1.15
Exception Type: ConnectionDoesNotExist
Exception Value:    
The connection admin doesn't exist
Exception Location: C:\Users\Nf00038\AppData\Local\Programs\Python\Python39\lib\site-packages\django\db\utils.py in ensure_defaults, line 169
Python Executable:  C:\Users\Nf00038\AppData\Local\Programs\Python\Python39\python.exe
Python Version: 3.9.5
Python Path:    
['G:\\Shares\\Website\\Development\\Intranet\\HealthcareProject4',
 'C:\\Users\\Nf00038\\AppData\\Local\\Programs\\Python\\Python39\\python39.zip',
 'C:\\Users\\Nf00038\\AppData\\Local\\Programs\\Python\\Python39\\DLLs',
 'C:\\Users\\Nf00038\\AppData\\Local\\Programs\\Python\\Python39\\lib',
 'C:\\Users\\Nf00038\\AppData\\Local\\Programs\\Python\\Python39',
 'C:\\Users\\Nf00038\\AppData\\Local\\Programs\\Python\\Python39\\lib\\site-packages',
 'C:\\Users\\Nf00038\\AppData\\Local\\Programs\\Python\\Python39\\lib\\site-packages\\win32',
 'C:\\Users\\Nf00038\\AppData\\Local\\Programs\\Python\\Python39\\lib\\site-packages\\win32\\lib',
 'C:\\Users\\Nf00038\\AppData\\Local\\Programs\\Python\\Python39\\lib\\site-packages\\Pythonwin']
Server time:    Sun, 10 Apr 2022 13:45:50 +0000
Error during template rendering
In template C:\Users\Nf00038\AppData\Local\Programs\Python\Python39\lib\site-packages\django\contrib\admin\templates\admin\base.html, error at line 0

The connection admin doesn't exist
1   {% load i18n static %}<!DOCTYPE html>
2   {% get_current_language as LANGUAGE_CODE %}{% get_current_language_bidi as LANGUAGE_BIDI %}
3   <html lang="{{ LANGUAGE_CODE|default:"en-us" }}" {% if LANGUAGE_BIDI %}dir="rtl"{% endif %}>
4   <head>
5   <title>{% block title %}{% endblock %}</title>
6   <link rel="stylesheet" type="text/css" href="{% block stylesheet %}{% static "admin/css/base.css" %}{% endblock %}">
7   {% block extrastyle %}{% endblock %}
8   {% if LANGUAGE_BIDI %}<link rel="stylesheet" type="text/css" href="{% block stylesheet_rtl %}{% static "admin/css/rtl.css" %}{% endblock %}">{% endif %}
9   {% block extrahead %}{% endblock %}
10  {% block responsive %}


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source