Changeset 1835
- Timestamp:
- 01/06/06 14:49:38 (3 years ago)
- Files:
-
- django/branches/magic-removal/AUTHORS (modified) (1 diff)
- django/branches/magic-removal/django/db/models/manager.py (modified) (2 diffs)
- django/branches/magic-removal/docs/faq.txt (modified) (3 diffs)
- django/branches/magic-removal/tests/modeltests/lookup/models.py (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
django/branches/magic-removal/AUTHORS
r1581 r1835 32 32 answer newbie questions, and generally made Django that much better: 33 33 34 akaihola 34 35 Andreas 35 36 David Ascher <http://ascher.ca/> django/branches/magic-removal/django/db/models/manager.py
r1792 r1835 20 20 cls.objects._prepare() 21 21 22 dispatcher.connect( 23 ensure_default_manager, 24 signal=signals.class_prepared 25 ) 22 dispatcher.connect(ensure_default_manager, signal=signals.class_prepared) 26 23 27 24 class Manager(object): 28 # Tracks each time a Manager instance is created. Used to retain order.25 # Tracks each time a Manager instance is created. Used to retain order. 29 26 creation_counter = 0 30 27 … … 177 174 178 175 def get_in_bulk(self, *args, **kwargs): 179 id_list = args and args[0] or kwargs ['id_list']176 id_list = args and args[0] or kwargs.get('id_list', []) 180 177 assert id_list != [], "get_in_bulk() cannot be passed an empty list." 181 178 kwargs['where'] = ["%s.%s IN (%s)" % (backend.quote_name(self.klass._meta.db_table), backend.quote_name(self.klass._meta.pk.column), ",".join(['%s'] * len(id_list)))] django/branches/magic-removal/docs/faq.txt
r1318 r1835 214 214 215 215 However, if you don't want to use mod_python, you can use a different server, 216 as long as that server has WSGI_ hooks. More information on alternate server 217 arrangements is forthcoming. 216 as long as that server has WSGI_ hooks. See the `server arrangements wiki page`_. 218 217 219 218 .. _WSGI: http://www.python.org/peps/pep-0333.html 219 .. _server arrangements wiki page: http://code.djangoproject.com/wiki/ServerArrangements 220 220 221 221 How do I install mod_python on Windows? … … 231 231 .. _`Running mod_python on Apache on Windows2000`: http://groups-beta.google.com/group/comp.lang.python/msg/139af8c83a5a9d4f 232 232 .. _`guide to getting mod_python working`: http://www.dscpl.com.au/articles/modpython-001.html 233 234 (Thanks to deelan for this info.)235 233 236 234 Will Django run under shared hosting (like TextDrive or Dreamhost)? … … 307 305 ----------------------------------------------------------- 308 306 309 If you don't care about clearing data, just do this:: 307 If you don't care about clearing data, just pipe the output of the 308 appropriate ``django-admin.py sqlreset`` command into your database's 309 command-line utility. For example:: 310 310 311 311 django-admin.py sqlreset appname | psql dbname django/branches/magic-removal/tests/modeltests/lookup/models.py
r1754 r1835 66 66 >>> Article.objects.get_in_bulk([1000]) 67 67 {} 68 >>> Article.objects.get_in_bulk([]) 69 Traceback (most recent call last): 70 ... 71 AssertionError: get_in_bulk() cannot be passed an empty list. 68 72 69 73 # get_values() is just like get_list(), except it returns a list of
