Static files are used to save files such as CSS, JavaScript, pictures, and other types of static files. We keep them in distinct folders, for as the js folder, which has all of the JavaScript files, and the images folder, which contains all of the images. These files are kept in the static subfolder of the project app. Django provides django.contrib.staticfiles which helps us to manage static files. There are different uses for static files:
- It clarifies the use of file methods and attributes.
- It is platform-independent in many ways, whereas generic files are not.
- Subclasses can be used to extend it.
Leave a Reply