Ticket #12107: 12107.model_meta_serialize.1.diff
File 12107.model_meta_serialize.1.diff, 1.9 KB (added by , 15 years ago) |
---|
-
django/db/models/options.py
21 21 DEFAULT_NAMES = ('verbose_name', 'db_table', 'ordering', 22 22 'unique_together', 'permissions', 'get_latest_by', 23 23 'order_with_respect_to', 'app_label', 'db_tablespace', 24 'abstract', 'managed', 'proxy' )24 'abstract', 'managed', 'proxy', 'serialize') 25 25 26 26 class Options(object): 27 27 def __init__(self, meta, app_label=None): … … 45 45 self.managed = True 46 46 self.proxy = False 47 47 self.proxy_for_model = None 48 self.serialize = True 48 49 self.parents = SortedDict() 49 50 self.duplicate_targets = {} 50 51 -
django/core/management/commands/dumpdata.py
73 73 model_list = get_models(app) 74 74 75 75 for model in model_list: 76 if not model._meta.proxy :76 if not model._meta.proxy and model._meta.serialize: 77 77 objects.extend(model._default_manager.all()) 78 78 79 79 try: -
docs/ref/models/options.txt
200 200 If set to ``True``, a model which subclasses another model will be treated as 201 201 a :ref:`proxy model <proxy-models>`. 202 202 203 ``serialize`` 204 ------------- 205 206 .. attribute:: Options.serialize 207 208 .. versionadded:: 1.2 209 210 If set to ``False``, the model will not be serialized by ``django-admin.py dumpdata``. Defaults to ``True``. 211 203 212 ``unique_together`` 204 213 ------------------- 205 214