I added the following code in my setting.py:
# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/4.2/howto/static-files/
STATIC_ROOT = os.path.join(BASE_DIR, 'static')
STATIC_URL = 'static/'
STATICFILES_DIRS = [
BASE_DIR / 'static',
os.path.join(BASE_DIR, 'static')
]
The app is able to find my .css file. However, it seems like the Django admin is not able to find its css files. And all of a sudden the following options show up in Django Admin.
When I comment out the code, these dark mode options disappears and Django admin works properly. Is this a bug in the Django 4.2? Or did I setup my static directory incorrectly?


It looks like there is a bug in the Django framework. Try creating a new virtual environment or uninstalling Django and reinstalling it.
settings.py