Changeset 297 for elixir/trunk/elixir/relationships.py
- Timestamp:
- 02/05/08 00:20:01 (5 years ago)
- Files:
-
- 1 modified
-
elixir/trunk/elixir/relationships.py (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
elixir/trunk/elixir/relationships.py
r269 r297 225 225 | | by a minus (for descending order). | 226 226 +--------------------+--------------------------------------------------------+ 227 | ``column_format`` | Specify an alternate format string for naming the | 228 | | columns in the mapping table. The default value is | 229 | | defined in ``elixir.options.M2MCOL_NAMEFORMAT``. You | 230 | | will be passed ``tablename``, ``key``, and ``entity`` | 231 | | as arguments to the format string. | 232 +--------------------+--------------------------------------------------------+ 233 227 234 228 235 ================ … … 671 678 self.ondelete = kwargs.pop('ondelete', None) 672 679 self.onupdate = kwargs.pop('onupdate', None) 680 self.column_format = kwargs.pop('column_format', options.M2MCOL_NAMEFORMAT) 673 681 674 682 self.secondary_table = None … … 749 757 750 758 for pk_col in desc.primary_keys: 751 colname = options.M2MCOL_NAMEFORMAT% \759 colname = self.column_format % \ 752 760 {'tablename': desc.tablename, 753 'key': pk_col.key} 754 761 'key': pk_col.key, 762 'entity': desc.entity.__name__.lower()} 763 755 764 # In case we have a many-to-many self-reference, we 756 765 # need to tweak the names of the columns so that we
