Changes between Version 13 and Version 14 of RemovingTheMagic
- Timestamp:
- Dec 14, 2005, 12:33:15 AM (19 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
RemovingTheMagic
v13 v14 41 41 == Database connection relocated/renamed == 42 42 43 '''Status: Not yet done'''44 45 Th is is easier to remember, clearer and more consistent.43 '''Status: Done''' 44 45 The connection is now available at {{{django.db.connection}}}. This is easier to remember, clearer and more consistent. 46 46 47 47 Old: … … 58 58 cursor = connection.cursor() 59 59 }}} 60 61 Backend-specific functions, if you should need them, are available at {{{django.db.backend}}}. 62 63 Old: 64 {{{ 65 #!python 66 from django.core import db 67 db.quote_name('foo') 68 }}} 69 70 New: 71 {{{ 72 #!python 73 from django.db import backend 74 backend.quote_name('foo') 75 }}} 76 77 Also, the various backend functionality has been split into three separate modules for each backend -- {{{base.py}}}, {{{creation.py}}} and {{{introspection.py}}}. This is purely for performance and memory savings, so that basic, everyday Django usage doesn't have to load the introspective functionality into memory. 60 78 61 79 == Interact directly with model classes, not with magic modules ==