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?

Was it helpful?

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")
         )
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top