Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/heroku/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何删除“;数据-w2p“U禁用”和“带”;在web2py中使用帮助器时的属性?_Web2py - Fatal编程技术网

如何删除“;数据-w2p“U禁用”和“带”;在web2py中使用帮助器时的属性?

如何删除“;数据-w2p“U禁用”和“带”;在web2py中使用帮助器时的属性?,web2py,Web2py,在我的视图文件中,如果我使用html帮助程序,它将使用一个奇怪的属性data-w2p\u disable\u with呈现 例如: {{=A('test', _href=URL())}} <img src="{{=image.file}}" /> 呈现为: <a href="/myapp/somecontroller/somefunction" data-w2p_disable_with="default">test</a> 这个属性的目的是什么 我

在我的视图文件中,如果我使用html帮助程序,它将使用一个奇怪的属性
data-w2p\u disable\u with
呈现

例如:

{{=A('test', _href=URL())}}
<img src="{{=image.file}}" />
呈现为:

<a href="/myapp/somecontroller/somefunction" data-w2p_disable_with="default">test</a>

  • 这个属性的目的是什么

  • 我怎样才能删除它


  • 这是因为web2py使用它的方法来显示内容

    例如:

    {{=A('test', _href=URL())}}
    
    <img src="{{=image.file}}" />
    
    
    
    一旦web2py处理上述代码,图像将不会显示。并将data-w2p_disable_with=“default”添加到输出html源中

    因此,修改代码如下:

    <img src="{{=URL('download', args=image.file)}}" />
    
    
    
    这一次,您将不会在html源代码中看到data-w2p_disable_with=“default”(在您的word中,它已被删除),并且在本例中显示了图像