Opened 17 years ago

Closed 17 years ago

#5002 closed (fixed)

[patch] using pdb with django

Reported by: vitja <dummylink@…> Owned by: nobody
Component: Core (Other) Version: dev
Severity: Keywords: pdb
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Set project directory to current if no one found, this lets use pdb with django

test.py:

import sys
import django.core.management as management
import settings

management.setup_environ(settings)
import django

this will work invoked by python test.py and no if by pdb:

>/home/vitja/Desktop/xxx/test.py(1)?()
-> import sys
(Pdb) n
>/home/vitja/Desktop/xxx/test.py(2)?()
-> import django.core.management as management
(Pdb) 
>/home/vitja/Desktop/xxx/test.py(3)?()
-> import settings
(Pdb) 
>/home/vitja/Desktop/xxx/test.py(5)?()
-> management.setup_environ(settings)
(Pdb) 
ValueError: 'Empty module name'

This patch fixes this.

Attachments (1)

pdb.diff (682 bytes ) - added by vitja <dummylink@…> 17 years ago.

Download all attachments as: .zip

Change History (4)

by vitja <dummylink@…>, 17 years ago

Attachment: pdb.diff added

comment:1 by Philippe Raoult, 17 years ago

Triage Stage: UnreviewedDesign decision needed

sounds worth including, it's a one liner and shouldn't break anything.

comment:2 by Jacob, 17 years ago

Triage Stage: Design decision neededReady for checkin

comment:3 by Malcolm Tredinnick, 17 years ago

Resolution: fixed
Status: newclosed

(In [6853]) Fixed #5002 -- Fixed a small problem when running via pdb. Thanks, dummylink@….

Note: See TracTickets for help on using tickets.
Back to Top