2017-08-16 63 views
-1

当我看到一个项目的源代码:_xx.html和xx.html有区别吗?

enter image description here

我发现有一些_xxx.html,为什么笔者给_?是否有非凡的应该注意?


编辑

这是Python的Django项目。

+0

我已经更新了我的回答如下更具体一点,因为你更新的问题瓦特/框架您”重新使用。 – Charles

回答

0

模板文件可能是部分文件,或者更确切地说不是直接提供的模板,而是在另一个模板中。 Django似乎没有任何关于如何命名你的partials的具体内容,但它看起来像是在MVC框架中使用_xx.html作为命名约定的惯例。

ASP.Net:ASP.NET MVC3 Partial View naming convention

回报率:http://guides.rubyonrails.org/layouts_and_rendering.html#using-partials

Django的:https://oncampus.oberlin.edu/webteam/2012/09/architecture-django-templates

相关问题