Changes between Version 13 and Version 14 of RemovingTheMagic


Ignore:
Timestamp:
12/14/2005 12:33:15 AM (10 years ago)
Author:
adrian
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • RemovingTheMagic

    v13 v14  
    4141== Database connection relocated/renamed ==
    4242
    43 '''Status: Not yet done'''
    44 
    45 This is easier to remember, clearer and more consistent.
     43'''Status: Done'''
     44
     45The connection is now available at {{{django.db.connection}}}. This is easier to remember, clearer and more consistent.
    4646
    4747Old:
     
    5858cursor = connection.cursor()
    5959}}}
     60
     61Backend-specific functions, if you should need them, are available at {{{django.db.backend}}}.
     62
     63Old:
     64{{{
     65#!python
     66from django.core import db
     67db.quote_name('foo')
     68}}}
     69
     70New:
     71{{{
     72#!python
     73from django.db import backend
     74backend.quote_name('foo')
     75}}}
     76
     77Also, 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.
    6078
    6179== Interact directly with model classes, not with magic modules ==
Back to Top