How to customizing CSS in djangocms-table

38 views
Skip to first unread message

Régis Silva

unread,
Apr 15, 2016, 6:18:51 PM4/15/16
to Django users
I use djangocms-table. And this plugin return

    <div class="container">
     
<h2>Tabela exemplo</h2>
     
<table>
       
<tr>
         
<td>2</td>
         
<td>3</td>
         
<td>5</td>
         
<td>8</td>
         
<td></td>
       
</tr>
       
<tr>
         
<td>a</td>
         
<td>b</td>
         
<td>c</td>
         
<td>d</td>
         
<td>e</td>
       
</tr>
       
<tr>
         
<td>f</td>
         
<td>g</td>
         
<td>h</td>
         
<td>i</td>
         
<td>j</td>
       
</tr>
     
</table>
   
</div>


But i need with Bootstrap style. I need

<div class="table-responsive">
 
<table border="0" align="center" class="table table-striped" style="max-width: 600px">
   
<tr>
     
<td align="center">&nbsp;</td>
     
<td align="center"><strong>2<br></strong></td>
     
<td align="center"><strong>3<br></strong></td>
     
<td align="center"><strong>5<br></strong></td>
     
<td align="center"><strong>8<br></strong></td>
   
</tr>
   
<tr>
     
<td align="center">a<br></td>
     
<td align="center">b<br></td>
     
<td align="center">c<br></td>
     
<td align="center">d<br></td>
     
<td align="center">e<br></td>
   
</tr>
   
<tr>
     
<td align="center">f<br></td>
     
<td align="center">g<br></td>
     
<td align="center">h<br></td>
     
<td align="center">i<br></td>
     
<td align="center">j<br></td>
   
</tr>
 
</table>
</div>

I'm not talking to insert the CSS properly, but extend the plugin so that it returns this bootstrap style.

Derek

unread,
Apr 16, 2016, 2:10:40 PM4/16/16
to Django users
Is this project being maintained; looks like last change was nearly a year ago..?

Luis Zárate

unread,
Apr 17, 2016, 2:55:56 AM4/17/16
to django...@googlegroups.com
You only need to overwrite the template

https://github.com/divio/djangocms-table/blob/master/djangocms_table/templates/cms/plugins/table.html

Django template engine find the template in the order of INSTALLED_APPS, so you only need to put an app with your version of  
templates/cms/plugins/table.html
before djangocms_table and django will load this file and not the djangocms_table file
> --
> You received this message because you are subscribed to the Google Groups "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
> To post to this group, send email to django...@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/df5af9aa-230e-4b94-8fd3-8bd2d4438be9%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

--
"La utopía sirve para caminar" Fernando Birri



Reply all
Reply to author
Forward
0 new messages