# Path: achilles/blocks.py
# class Library(BaseLibrary):
#         class B(Block):
# class Block(object):
#     def __init__(self, namespace=None):
#     def register(self, name=None):
#     def block(self, name=None, template_name=None, takes_context=False):
#         def dec(name):
#     def _create_class(self, func):
#             def get_context_data(self, *args, **kwargs):
# def get(name, context=None):
#     def __init__(self, context):
#     def render(self, *args, **kwargs):
#     def get_context_data(self, *args, **kwargs):
#     def update(self, transport, *args, **kwargs):
# def update(transport, name, *args, **kwargs):
# def render(transport):
# 
# Path: achilles/tables/columns.py
# class Column(object):
#     """
#     Table column, extract information from objects and render it whitin the
#     table
#     """
#     # Creation counter used to retrieve original column order
#     creation_counter = 0
# 
#     def __init__(self, verbose_name=None,
#                  accessor=default_accessor,
#                  visible=lambda x: True):
#         """
#         :param verbose_name: Column human-readable name
#         :param accessor: Function to access get data from the object
#         :param visible: Function giving visibility flag for the given row
#         """
#         self.creation_counter = Column.creation_counter
#         Column.creation_counter += 1
# 
#         self.verbose_name = verbose_name
#         self.accessor = accessor
#         self.visible = visible
# 
#     def contribute_to_class(self, table, name):
#         self.name = name
#         self.verbose_name = self.verbose_name or name
#         self.table = table
# 
#     def render(self, obj):
#         """
#         Dump cell for the given object
#         """
#         if self.visible(obj):
#             return self.content(obj)
#         else:
#             return ''
# 
#     def content(self, obj):
#         """
#         Render column value for the given object
# 
#         :param obj: Object to read the value from
#         """
#         return str(self.accessor(obj, self.name))


from django.utils.translation import ugettext_lazy as _
from six import add_metaclass
from achilles import blocks
from achilles.tables.columns import Column
            return self.model.objects.all()
        else:
            raise NotImplementedError('You should implement this method or '
                                      'define model field')

    def get_object(self, id):
        """
        Return a table object from its unique object id
        """
        if self.model:
            return self.model.objects.get(pk=id)
        else:
            raise NotImplementedError('You should implement this method or '
                                      'define model field')

    def rows(self):
        """
        Generator over :class:`Row` elements for each item in object list
        """
        for obj in self.objects():
            yield Row(self, obj)

    def columns(self):
        """
        List of :class:`Column` elements defined for this table
        """
        cols = []
        for c in dir(self):
            if not c.startswith('_'):
                c = getattr(self, c)

# Path: achilles/blocks.py
# class Library(BaseLibrary):
#         class B(Block):
# class Block(object):
#     def __init__(self, namespace=None):
#     def register(self, name=None):
#     def block(self, name=None, template_name=None, takes_context=False):
#         def dec(name):
#     def _create_class(self, func):
#             def get_context_data(self, *args, **kwargs):
# def get(name, context=None):
#     def __init__(self, context):
#     def render(self, *args, **kwargs):
#     def get_context_data(self, *args, **kwargs):
#     def update(self, transport, *args, **kwargs):
# def update(transport, name, *args, **kwargs):
# def render(transport):
# 
# Path: achilles/tables/columns.py
# class Column(object):
#     """
#     Table column, extract information from objects and render it whitin the
#     table
#     """
#     # Creation counter used to retrieve original column order
#     creation_counter = 0
# 
#     def __init__(self, verbose_name=None,
#                  accessor=default_accessor,
#                  visible=lambda x: True):
#         """
#         :param verbose_name: Column human-readable name
#         :param accessor: Function to access get data from the object
#         :param visible: Function giving visibility flag for the given row
#         """
#         self.creation_counter = Column.creation_counter
#         Column.creation_counter += 1
# 
#         self.verbose_name = verbose_name
#         self.accessor = accessor
#         self.visible = visible
# 
#     def contribute_to_class(self, table, name):
#         self.name = name
#         self.verbose_name = self.verbose_name or name
#         self.table = table
# 
#     def render(self, obj):
#         """
#         Dump cell for the given object
#         """
#         if self.visible(obj):
#             return self.content(obj)
#         else:
#             return ''
# 
#     def content(self, obj):
#         """
#         Render column value for the given object
# 
#         :param obj: Object to read the value from
#         """
#         return str(self.accessor(obj, self.name))


# Path: achilles/tables/common.py
from django.utils.translation import ugettext_lazy as _
from six import add_metaclass
from achilles import blocks
from achilles.tables.columns import Column

            return self.model.objects.all()
        else:
            raise NotImplementedError('You should implement this method or '
                                      'define model field')

    def get_object(self, id):
        """
        Return a table object from its unique object id
        """
        if self.model:
            return self.model.objects.get(pk=id)
        else:
            raise NotImplementedError('You should implement this method or '
                                      'define model field')

    def rows(self):
        """
        Generator over :class:`Row` elements for each item in object list
        """
        for obj in self.objects():
            yield Row(self, obj)

    def columns(self):
        """
        List of :class:`Column` elements defined for this table
        """
        cols = []
        for c in dir(self):
            if not c.startswith('_'):
                c = getattr(self, c)

                if isinstance(c, Column):