like the css_class attribute I can pass to a `Div() in the layout helper, I need to set the id as well...

 self.helper.layout = Layout(              
            Div('attr1', css_class="myclass")
         )

Any ideas?

有帮助吗?

解决方案

Alright, per try-and-error I found the solution! I think its hard to find via Google...

You can use css_id:

 self.helper.layout = Layout(              
            Div('attr1', css_class="myclass", css_id="myid")
         )
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top