Skip to content

Commit

Permalink
Make table.sequence default to ...
Browse files Browse the repository at this point in the history
  • Loading branch information
selwin committed Apr 27, 2012
1 parent 98d7d28 commit bcd3bd0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion django_tables2/columns.py
Expand Up @@ -670,7 +670,7 @@ def __init__(self, table):


# A list of column names in the correct sequence that they should be # A list of column names in the correct sequence that they should be
# rendered in the table. # rendered in the table.
self.sequence = (self.table.sequence or Sequence(('...', ))) self.sequence = self.table.sequence
self.sequence.expand(self.table.base_columns.keys()) self.sequence.expand(self.table.base_columns.keys())


#Prepare each column's ``render`` function and its expected argument #Prepare each column's ``render`` function and its expected argument
Expand Down
2 changes: 1 addition & 1 deletion django_tables2/tables.py
Expand Up @@ -233,7 +233,7 @@ def __init__(self, data, order_by=None, orderable=None, empty_text=None,
template=None, sortable=None): template=None, sortable=None):
super(Table, self).__init__() super(Table, self).__init__()
self.exclude = exclude or () self.exclude = exclude or ()
self.sequence = sequence self.sequence = sequence or Sequence(('...', ))
self.data = self.TableDataClass(data=data, table=self) self.data = self.TableDataClass(data=data, table=self)
self.rows = BoundRows(self.data) self.rows = BoundRows(self.data)
self.columns = BoundColumns(self) self.columns = BoundColumns(self)
Expand Down

0 comments on commit bcd3bd0

Please sign in to comment.