python - How to set active tab using crispy form? -


i have following code snippet show tabs using crispy form in modelform. possible set active tab when page loads? put css_class='active" in second tab, seems not working. in advance

self.helper.layout = layout(                 common_layout,                 tabholder(                     tab(                         'tab1',                         field('name', readonly=true),                         field('age', readonly=true),                      ),                     tab(                         'class',                         field('grade 1'),                         css_class="active",                     ),             ) ) 

active should lowercase

# ... tab(     'class',     field('grade 1'),     css_class="active", ), #... 

Comments

Popular posts from this blog

java - SSE Emitter : Manage timeouts and complete() -

jquery - uncaught exception: DataTables Editor - remote hosting of code not allowed -

java - How to resolve error - package com.squareup.okhttp3 doesn't exist? -