Opened 8 years ago

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

Download all attachments as: .zip

Change History (4)

Changed 8 years ago by vitja <dummylink@…>

comment:1 Changed 8 years ago by PhiR

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Design decision needed

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

comment:2 Changed 7 years ago by jacob

  • Triage Stage changed from Design decision needed to Ready for checkin

comment:3 Changed 7 years ago by mtredinnick

  • Resolution set to fixed
  • Status changed from new to closed

(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