Question:
How to specify css file for admin? : Django

Here, Ii am assuming that your static folder is in the root folder of your project. If not, replace "static" for the proper path to your static folder.


The file myadmin.css is located in static/css/.


When running locally, the following appears in the console when loading the admin page:


"GET /static/css/myadmin.css HTTP/1.1" 404 1804


If your static folder is not inside one app then you should register it in the settings. Go to your settings.py file and add the next line:


STATICFILES_DIRS = [BASE_DIR / "static"]


Suggested blogs:

>Invoking Python script from scons and pass ARGLIST

>Plugins and Presets for Vuejs project

>Python Error Solved: load_associated_files do not load a txt file

>PHP cURL to upload video to azure blob storage

>PHP Error Solved: htaccess problem with an empty string in URL

>Python Error Solved: pg_config executable not found

>Set up Node.js & connect to a MongoDB Database Using Node.js


Nisha Patel

Nisha Patel

Submit
0 Answers