Static Files such as Images, CSS, or JS files are often loaded via a different app in production websites to avoid loading multiple stuff from the same server. This article revolves around, how you can set up the static app in Django and server Static Files from the same.
Create a folder of name static in the root directory
Project folder / settings.py ( find STATIC_URL at the bottom )
STATIC_URL = 'static/' # added manually STATICFILES_DIRS = [ BASE_DIR / "static", "/var/www/static/", ]
http://127.0.0.1:8000/static/test.txt
Then you will get the test.txt file data. test.txt files create inside the static folder.