'Django admin page appears to be blank
I wondered if someone could help me resolve as to why my admin page appears to be blank? I am able to log in successfully with my superuser. For example when I go to localhost:8000/admin/ -the page returns with a login form, then when I click 'login' the resulting page is blank. I have already checked that 'django.contrib.admin' is installed in every URLS file. I have registered the models in the django admin.py files. I have also reinstalled Django.
INSTALLED_APPS = [
'HealthcareProject4',
'HealthcareProject4.Users2',
'HealthcareProject4.Admin',
'HealthcareProject4.CellularModelling',
'HealthcareProject4.Conditions',
'HealthcareProject4.Drugs',
'HealthcareProject4.Events',
'HealthcareProject4.Games',
'HealthcareProject4.GetInvolved',
'HealthcareProject4.News',
'HealthcareProject4.Outcomes',
'HealthcareProject4.Population',
'HealthcareProject4.Systems',
'HealthcareProject4.Trusts',
'HealthcareProject4.Logging',
'HealthcareProject4.Messaging',
# Add your apps here to enable them
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
# Other apps #
#'highcharts'
]
urls.py
app_name = "Conditions"
from datetime import datetime
from django.urls import path
from django.contrib import admin
from django.contrib.auth.views import LoginView, LogoutView
from django.conf.urls import include
from django.conf.urls import url
from HealthcareProject4.Conditions import views
urlpatterns = [
url('^admin/', admin.site.urls),
url('^home/', views.home, name='home'),
url('^asthma/', views.asthma, name='Asthma'),
url('^atrialfibrillation', views.atrialfibrillation, name='AtrialFibrillation'),
url('^bloodpressure/', views.bloodpressure, name='BloodPressure'),
url('^cancer/', views.cancer, name='Cancer'),
url('^cervicalscreening/', views.cervicalscreening, name='CervicalScreening'),
url('^chronicheartdisease/', views.chronicheartdisease, name='ChronicHeartDisease'),
url('^chronickidneydisease/', views.chronickidneydisease, name='ChronicKidneyDisease'),
url('^copd/', views.copd, name='COPD'),
url('^cvd/', views.cvd, name='CVD'),
url('^dementia/', views.dementia, name='Dementia'),
url('^depression/', views.depression, name='Depression'),
url('^diabetes/', views.diabetes, name='Diabetes'),
url('^epilepsy/', views.epilepsy, name='Epilepsy'),
url('^heartfailure/', views.heartfailure, name='HeartFailure'),
url('^hypertension/', views.hypertension, name='Hypertension'),
url('^learningdisability/', views.learningdisability, name='LearningDisability'),
url('^mentalhealth/', views.mentalhealth, name='MentalHealth'),
url('^obesity/', views.obesity, name='Obesity'),
url('^osteoporosis/', views.osteoporosis, name='Osteoporosis'),
url('^palliativecare/', views.palliativecare, name='PalliativeCare'),
url('^rheumatoidarthritis/', views.rheumatoidarthritis, name='RhemuatoidArthritis'),
url('^smoking/', views.smoking, name='Smoking'),
url('^stroke/', views.stroke, name='Stroke'),
]
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
