Learn Python in one month (17): Static resources and Ajax requests (Web development)

Column introduction

Combining my own experience and the Python tutorial summarized by internal materials, 3 chapters a day, 1 month can complete the learning of Python in an all-round way and carry out practical development. After learning, I will definitely become a boss! Come on! roll up!

For all articles, please visit the column: "Python Full Stack Tutorial (0 Basics)"



Static resources and Ajax requests

Load static resources

If you want to use static resources in a Django project, you can first create a directory for saving static resources. In votethe project, we put static resources staticin a folder named , which contains three subfolders: css, js and images, which are used to save external CSS files, external JavaScript files and image resources respectively.

In order to be able to find the folder where static resources are saved, we also need to modify the configuration file of the Django project settings.py, as follows:

Guess you like

Origin blog.csdn.net/ml202187/article/details/131717382