-- Django Study Notes
------------------ 2014/10/23
Django architecture:
The hosts file is sent to the customer and displayed on the customer's page.
Incoming Request Transfer/Hello /.
Django decides the root urlconf by configuring root_urlconf.
In all URL modes in urlconf, Django finds the first entry that matches/Hello.
If a match is found, the corresponding view function is called, and the view function returns an httpresponse
Django converts httpresponse to an appropriate HTTP response, which is displayed on the web page.
Use Bootstrap in DJANGO:
1. Create a static folder in your favorite directory, create CSS, IMG, JS, fonts and other files in the folder, and put the bootstrap files in the corresponding directory.
2. Configure parameters so that Django can find these static files and add them to the settings. py file.
Staticfiles_dirs = ('/Your/directory/static ',)
3. Use static elements in HTML files.
<LINK rel = "stylesheet" href = "/static/CSS/bootstrap.css"/>
In this way, you can use Bootstrap.
Django Study Notes