Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed #5002 -- Fixed a small problem when running via pdb. Thanks, du…

…mmylink@gmail.com.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@6853 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit a88ca126fcfe579a38f3e94a7668b626f0e468c3 1 parent 1f629bf
Malcolm Tredinnick malcolmt authored
Showing with 2 additions and 0 deletions.
  1. +2 −0  django/core/management/__init__.py
2  django/core/management/__init__.py
View
@@ -254,6 +254,8 @@ def setup_environ(settings_mod):
# way. For example, if this file (manage.py) lives in a directory
# "myproject", this code would add "/path/to/myproject" to sys.path.
project_directory, settings_filename = os.path.split(settings_mod.__file__)
+ if not project_directory:
+ project_directory = os.getcwd()
project_name = os.path.basename(project_directory)
settings_name = os.path.splitext(settings_filename)[0]
sys.path.append(os.path.join(project_directory, os.pardir))
Please sign in to comment.
Something went wrong with that request. Please try again.