InterviewSolution
Saved Bookmarks
| 1. |
Explain the url_for() function and why would you want to hard-code URLs into your templates instead of utilizing the URL reversing function url_for()? |
|
Answer» We use the url_for() function to create a URL for a given function. It takes the function's name as the first parameter, as well as any number of keyword arguments, each of which corresponds to a variable component of the URL rule. As query parameters, UNKNOWN variable bits are appended to the URL.
|
|