flask issue highlights

1. For example redirct like this can not be named functions, because these things have a function of the flask, so that the system will not tell you in the end is where the use of the function.

Here Insert Picture Description

2. I wrote a http.py document, introduced in the document make_response

Here Insert Picture Description

The problem is in my files are named above, should not be named http, http python comes to the plate, should not use the name, this will have a huge problem.

3. The introduction of static files in question, ... use url_for introduced.

Here Insert Picture Description

The reason for the error is static must be written, all the static files are required on the static folder, which is the default, so "{{url_for ( 'static', filename = 'css / some.css')}} "such wording is

4. want to use the asynchronous ajax loading stuff, but gets displayed in the $ sign is not valid ???

$ is not defined
Here Insert Picture Description

Here Insert Picture Description

Answer: no import jQuery jar package, this is the most likely cause can be loaded jquery by cdn

<script src="https://code.jquery.com/jquery-3.3.1.min.js"></script>

Guess you like

Origin blog.csdn.net/weixin_42755384/article/details/90407515