#22873: Allow disabling debug cursor when DEBUG=True
----------------------------------------------+--------------------
     Reporter:  john@…                        |      Owner:  nobody
         Type:  Bug                           |     Status:  new
    Component:  Database layer (models, ORM)  |    Version:  master
     Severity:  Normal                        |   Keywords:
 Triage Stage:  Unreviewed                    |  Has patch:  1
Easy pickings:  1                             |      UI/UX:  0
----------------------------------------------+--------------------
 In Django 1.6, the logic for using the CursorDebugWrapper was:

 * If db.connection.use_debug_cursor is True, use it
 * If db.connection.use_debug_cursor is None, defer to settings.DEBUG
 * if db.connection.use_debug_cursor is False, don't use it.

 This was changed in the fix for #20420.  Commit [127218b92bb8] changed the
 logic to:

 * If db.connection.use_debug_cursor is True, use it
 * If db.connection.use_debug_cursor is False or None, defer to
 settings.DEBUG

 I am using a management command to load lots of data into the database,
 and I was setting use_debug_cursor to False to disable query logging
 before my lengthy import.  I'd rather not have to remember to set
 DEBUG=False every time I run a management command on my dev box.  I'd like
 the 1.6 trinary behavior, as well as the better queries_logged property
 introduced in [40bfd8561d016]

-- 
Ticket URL: <https://code.djangoproject.com/ticket/22873>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/065.227c4d6d78759bf04e5dbc1df06e0845%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to