diff options
| author | Alex Gaynor <alex.gaynor@gmail.com> | 2009-12-12 02:10:28 +0000 |
|---|---|---|
| committer | Alex Gaynor <alex.gaynor@gmail.com> | 2009-12-12 02:10:28 +0000 |
| commit | c88113683d6538dbc2f779ff57fd1ea20211abec (patch) | |
| tree | 48756d324a15b8d1d990855ad3249f607a81ebf5 /django/db/models/base.py | |
| parent | 353e0797920fbf5170653c9a9aabe2572a5ad214 (diff) | |
| download | django-c88113683d6538dbc2f779ff57fd1ea20211abec.tar.gz | |
[soc2009/multidb] Merged up to trunk r11810. There are many conflicts in this merge, these will be resolved in a subsequent commit.
git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/multidb@11812 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django/db/models/base.py')
| -rw-r--r-- | django/db/models/base.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/django/db/models/base.py b/django/db/models/base.py index eb484ea3bc..8a6ffd12b3 100644 --- a/django/db/models/base.py +++ b/django/db/models/base.py @@ -230,6 +230,7 @@ class ModelBase(type): signals.class_prepared.send(sender=cls) +<<<<<<< HEAD:django/db/models/base.py class ModelState(object): """ A class for storing instance state @@ -237,6 +238,8 @@ class ModelState(object): def __init__(self, db=None): self.db = db +======= +>>>>>>> master:django/db/models/base.py class Model(object): __metaclass__ = ModelBase _deferred = False @@ -488,7 +491,11 @@ class Model(object): if pk_set: # Determine whether a record with the primary key already exists. if (force_update or (not force_insert and +<<<<<<< HEAD:django/db/models/base.py manager.using(using).filter(pk=pk_val).exists())): +======= + manager.filter(pk=pk_val).exists())): +>>>>>>> master:django/db/models/base.py # It does already exist, so do an UPDATE. if force_update or non_pks: values = [(f, None, (raw and getattr(self, f.attname) or f.pre_save(self, False))) for f in non_pks] @@ -527,7 +534,10 @@ class Model(object): # Store the database on which the object was saved self._state.db = using +<<<<<<< HEAD:django/db/models/base.py # Signal that the save is complete +======= +>>>>>>> master:django/db/models/base.py if origin and not meta.auto_created: signals.post_save.send(sender=origin, instance=self, created=(not record_exists), raw=raw) |
