2👍
You need to read that documentation more closely. That warning is for production. In development, you do use that static-serving method, ie putting it in your urls.py. And, that documentation will also show that the templates directory is not the right place to put them: a separate static or media directory is.
Edit after comment I really don’t understand your comment. Either you do it in development via the static serving view, or you use your production server. But you say you don’t have a production server. When you get one, whether it’s Apache or Nginx or whatever, you put your static files in a directory and tell that server to serve files from there. That is the simple solution. The staticfiles app, exactly as in the docs you quoted, are for when you’ve got lots of files in different apps (and it simplifies the move from development to production, not complicates it as you seem to think).
0👍
Suppose your app is www.
- setting.py -> STATIC_ROOT = ‘static/’
- make dir www/static
- make file www/static/some.html
- in browser localhost:8000/static/some.html
That’s all.
- [Answered ]-Creating an API using Django-Rest-Framework with join tables
- [Answered ]-Rebuild content of a Div tag in complete function of $.ajaxt
- [Answered ]-Python Memcached: caching objects