django app under multi-template / static file the same name issue

  Under normal circumstances, django project is the presence of multiple app if there is the phenomenon of the same name (such as two app in both render function to write "index.html", the next two app has two templates folder, respectively, below there are a index.html) in this case, use will render all of the first app index.html.

  Solution: Create an app with the same name in each app's templates folder folder will render written in the "name of the folder / template that the original name /", so as not to conflict occurred.

  Note: Static files can use the same method to avoid conflicts.

Guess you like

Origin www.cnblogs.com/Zarax/p/11862937.html