Ticket #13805: manager.patch

File manager.patch, 1.0 KB (added by limscoder, 14 years ago)

Patch to add option 'using' argument to method signature

Line 
1*** ./manager.py 2010-01-22 07:30:06.000000000 -0700
2--- manager_2.py 2010-12-07 13:00:04.097207034 -0700
3***************
4*** 197,204 ****
5 def _update(self, values, **kwargs):
6 return self.get_query_set()._update(values, **kwargs)
7
8! def raw(self, raw_query, params=None, *args, **kwargs):
9! return RawQuerySet(raw_query=raw_query, model=self.model, params=params, using=self._db, *args, **kwargs)
10
11 class ManagerDescriptor(object):
12 # This class ensures managers aren't accessible via model instances.
13--- 197,207 ----
14 def _update(self, values, **kwargs):
15 return self.get_query_set()._update(values, **kwargs)
16
17! def raw(self, raw_query, params=None, using=None, *args, **kwargs):
18! if using is None:
19! using = self._db
20!
21! return RawQuerySet(raw_query=raw_query, model=self.model, params=params, using=using, *args, **kwargs)
22
23 class ManagerDescriptor(object):
24 # This class ensures managers aren't accessible via model instances.
Back to Top