from .models import Productos
from table import Table
from table.columns import Column
from table.utils import A
from table.columns import LinkColumn, Link
class PruebaTable(Table):
    id = Column(field='id', header=u'id')
    name = Column(field='descripcion', header=u'descripción')

    action = LinkColumn(header=u'edicion', links=[Link(text=u'edición',attrs={
        'class': 'btn btn-primary',
        'data-toggle': 'modal',
        'data-target': '#editarModal'
    },) ])
    action1 = LinkColumn(header=u'eliminar', links=[Link(text=u'eliminar', attrs={
        'class': 'btn btn-warning',
        'data-toggle': 'modal',
        'data-target': '#eliminarModal'
    }, )])
    class Meta:
        model = Productos
