Changeset 490 for elixir/trunk/elixir/relationships.py
- Timestamp:
- 10/02/09 12:06:14 (3 years ago)
- Files:
-
- 1 modified
-
elixir/trunk/elixir/relationships.py (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
elixir/trunk/elixir/relationships.py
r488 r490 303 303 | ``table_kwargs`` | A dictionary holding any other keyword argument you | 304 304 | | might want to pass to the underlying Table object. | 305 +--------------------+--------------------------------------------------------+| ``column_format`` | DEPRECATED. Specify an alternate format string for |306 | | naming the |307 | | columns in the mapping table. The default value is |308 | | defined in ``elixir.options.M2MCOL_NAMEFORMAT``. You |309 | | will be passed ``tablename``, ``key``, and ``entity`` |310 | | as arguments to the format string. |311 305 +--------------------+--------------------------------------------------------+ 312 306 … … 839 833 ondelete=None, onupdate=None, 840 834 table=None, schema=None, 841 column_format=None,842 835 filter=None, 843 836 table_kwargs=None, … … 858 851 self.schema = schema 859 852 860 if column_format: 861 warnings.warn("The 'column_format' argument on ManyToMany " 862 "relationships is deprecated. Please use the 'local_colname' " 863 "and/or 'remote_colname' arguments if you want custom " 864 "column names for this table only, or modify " 865 "options.M2MCOL_NAMEFORMAT if you want a custom format for " 866 "all ManyToMany tables", DeprecationWarning, stacklevel=3) 867 self.column_format = column_format or options.M2MCOL_NAMEFORMAT 853 #TODO: this can probably be simplified/moved elsewhere since the 854 #argument disappeared 855 self.column_format = options.M2MCOL_NAMEFORMAT 868 856 if not hasattr(self.column_format, '__call__'): 869 857 # we need to store the format in a variable so that the … … 890 878 891 879 super(ManyToMany, self).__init__(of_kind, *args, **kwargs) 892 893 def get_table(self):894 warnings.warn("The secondary_table attribute on ManyToMany objects is "895 "deprecated. You should rather use the table attribute.",896 DeprecationWarning, stacklevel=2)897 return self.table898 secondary_table = property(get_table)899 880 900 881 def match_type_of(self, other):
