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")
)
Question
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?
Solution
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")
)