Opened 9 years ago

Closed 9 years ago

#5002 closed (fixed)

[patch] using pdb with django

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

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@…> 9 years ago.

Download all attachments as: .zip

Change History (4)

Changed 9 years ago by vitja <dummylink@…>

Attachment: pdb.diff added

comment:1 Changed 9 years ago by Philippe Raoult

Needs documentation: unset
Needs tests: unset
Patch needs improvement: unset
Triage Stage: UnreviewedDesign decision needed

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

comment:2 Changed 9 years ago by Jacob

Triage Stage: Design decision neededReady for checkin

comment:3 Changed 9 years ago by Malcolm Tredinnick

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