{"action":"created","comment":{"url":"https://api.github.com/repos/django-extensions/django-extensions/pulls/comments/35961954","id":35961954,"diff_hunk":"@@ -149,9 +156,44 @@ def execute(self, sql, params=()):\n         except ImportError:\n             raise CommandError(\"Werkzeug is required to use runserver_plus.  Please visit http://werkzeug.pocoo.org/ or install via pip. (pip install Werkzeug)\")\n \n+        try:\n+            from django_pdb.middleware import PdbMiddleware\n+\n+            pdb_option = options.get('pdb', False)\n+            ipdb_option = options.get('ipdb', False)\n+            pm = options.get('pm', False)\n+\n+            # Add pdb middleware if --pdb is specified or if in DEBUG mode\n+            middleware = 'django_pdb.middleware.PdbMiddleware'\n+            if ((pdb_option or settings.DEBUG) and","path":"django_extensions/management/commands/runserver_plus.py","position":36,"original_position":36,"commit_id":"218650895f05bb998ecba6d478a9cab6d07260bb","original_commit_id":"218650895f05bb998ecba6d478a9cab6d07260bb","user":{"login":"ryneeverett","id":3280280,"avatar_url":"https://avatars.githubusercontent.com/u/3280280?v=3","gravatar_id":"","url":"https://api.github.com/users/ryneeverett","html_url":"https://github.com/ryneeverett","followers_url":"https://api.github.com/users/ryneeverett/followers","following_url":"https://api.github.com/users/ryneeverett/following{/other_user}","gists_url":"https://api.github.com/users/ryneeverett/gists{/gist_id}","starred_url":"https://api.github.com/users/ryneeverett/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ryneeverett/subscriptions","organizations_url":"https://api.github.com/users/ryneeverett/orgs","repos_url":"https://api.github.com/users/ryneeverett/repos","events_url":"https://api.github.com/users/ryneeverett/events{/privacy}","received_events_url":"https://api.github.com/users/ryneeverett/received_events","type":"User","site_admin":false},"body":"> Without it, --ipdb would not add the middleware?!\r\n\r\nHmm?","created_at":"2015-07-31T10:17:43Z","updated_at":"2015-07-31T10:17:43Z","html_url":"https://github.com/django-extensions/django-extensions/pull/703#discussion_r35961954","pull_request_url":"https://api.github.com/repos/django-extensions/django-extensions/pulls/703","_links":{"self":{"href":"https://api.github.com/repos/django-extensions/django-extensions/pulls/comments/35961954"},"html":{"href":"https://github.com/django-extensions/django-extensions/pull/703#discussion_r35961954"},"pull_request":{"href":"https://api.github.com/repos/django-extensions/django-extensions/pulls/703"}}},"pull_request":{"url":"https://api.github.com/repos/django-extensions/django-extensions/pulls/703","id":40287072,"html_url":"https://github.com/django-extensions/django-extensions/pull/703","diff_url":"https://github.com/django-extensions/django-extensions/pull/703.diff","patch_url":"https://github.com/django-extensions/django-extensions/pull/703.patch","issue_url":"https://api.github.com/repos/django-extensions/django-extensions/issues/703","number":703,"state":"closed","locked":false,"title":"Integrate with django-pdb.","user":{"login":"ryneeverett","id":3280280,"avatar_url":"https://avatars.githubusercontent.com/u/3280280?v=3","gravatar_id":"","url":"https://api.github.com/users/ryneeverett","html_url":"https://github.com/ryneeverett","followers_url":"https://api.github.com/users/ryneeverett/followers","following_url":"https://api.github.com/users/ryneeverett/following{/other_user}","gists_url":"https://api.github.com/users/ryneeverett/gists{/gist_id}","starred_url":"https://api.github.com/users/ryneeverett/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ryneeverett/subscriptions","organizations_url":"https://api.github.com/users/ryneeverett/orgs","repos_url":"https://api.github.com/users/ryneeverett/repos","events_url":"https://api.github.com/users/ryneeverett/events{/privacy}","received_events_url":"https://api.github.com/users/ryneeverett/received_events","type":"User","site_admin":false},"body":"Per issue #483.\r\n\r\nI haven't tested very thoroughly (just with the `django-pdb` testapp) but hoping to get some feedback if I'm on the right track.","created_at":"2015-07-18T05:29:24Z","updated_at":"2015-07-31T10:17:43Z","closed_at":"2015-07-31T09:47:34Z","merged_at":"2015-07-31T09:47:34Z","merge_commit_sha":"fcebe54d0a0b57229d0524f07b55e1fb8cbb1933","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/django-extensions/django-extensions/pulls/703/commits","review_comments_url":"https://api.github.com/repos/django-extensions/django-extensions/pulls/703/comments","review_comment_url":"https://api.github.com/repos/django-extensions/django-extensions/pulls/comments{/number}","comments_url":"https://api.github.com/repos/django-extensions/django-extensions/issues/703/comments","statuses_url":"https://api.github.com/repos/django-extensions/django-extensions/statuses/218650895f05bb998ecba6d478a9cab6d07260bb","head":{"label":"ryneeverett:django-pdb","ref":"django-pdb","sha":"218650895f05bb998ecba6d478a9cab6d07260bb","user":{"login":"ryneeverett","id":3280280,"avatar_url":"https://avatars.githubusercontent.com/u/3280280?v=3","gravatar_id":"","url":"https://api.github.com/users/ryneeverett","html_url":"https://github.com/ryneeverett","followers_url":"https://api.github.com/users/ryneeverett/followers","following_url":"https://api.github.com/users/ryneeverett/following{/other_user}","gists_url":"https://api.github.com/users/ryneeverett/gists{/gist_id}","starred_url":"https://api.github.com/users/ryneeverett/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ryneeverett/subscriptions","organizations_url":"https://api.github.com/users/ryneeverett/orgs","repos_url":"https://api.github.com/users/ryneeverett/repos","events_url":"https://api.github.com/users/ryneeverett/events{/privacy}","received_events_url":"https://api.github.com/users/ryneeverett/received_events","type":"User","site_admin":false},"repo":{"id":39287519,"name":"django-extensions","full_name":"ryneeverett/django-extensions","owner":{"login":"ryneeverett","id":3280280,"avatar_url":"https://avatars.githubusercontent.com/u/3280280?v=3","gravatar_id":"","url":"https://api.github.com/users/ryneeverett","html_url":"https://github.com/ryneeverett","followers_url":"https://api.github.com/users/ryneeverett/followers","following_url":"https://api.github.com/users/ryneeverett/following{/other_user}","gists_url":"https://api.github.com/users/ryneeverett/gists{/gist_id}","starred_url":"https://api.github.com/users/ryneeverett/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ryneeverett/subscriptions","organizations_url":"https://api.github.com/users/ryneeverett/orgs","repos_url":"https://api.github.com/users/ryneeverett/repos","events_url":"https://api.github.com/users/ryneeverett/events{/privacy}","received_events_url":"https://api.github.com/users/ryneeverett/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ryneeverett/django-extensions","description":"This is a repository for collecting global custom management extensions for the Django Framework. ","fork":true,"url":"https://api.github.com/repos/ryneeverett/django-extensions","forks_url":"https://api.github.com/repos/ryneeverett/django-extensions/forks","keys_url":"https://api.github.com/repos/ryneeverett/django-extensions/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ryneeverett/django-extensions/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ryneeverett/django-extensions/teams","hooks_url":"https://api.github.com/repos/ryneeverett/django-extensions/hooks","issue_events_url":"https://api.github.com/repos/ryneeverett/django-extensions/issues/events{/number}","events_url":"https://api.github.com/repos/ryneeverett/django-extensions/events","assignees_url":"https://api.github.com/repos/ryneeverett/django-extensions/assignees{/user}","branches_url":"https://api.github.com/repos/ryneeverett/django-extensions/branches{/branch}","tags_url":"https://api.github.com/repos/ryneeverett/django-extensions/tags","blobs_url":"https://api.github.com/repos/ryneeverett/django-extensions/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ryneeverett/django-extensions/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ryneeverett/django-extensions/git/refs{/sha}","trees_url":"https://api.github.com/repos/ryneeverett/django-extensions/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ryneeverett/django-extensions/statuses/{sha}","languages_url":"https://api.github.com/repos/ryneeverett/django-extensions/languages","stargazers_url":"https://api.github.com/repos/ryneeverett/django-extensions/stargazers","contributors_url":"https://api.github.com/repos/ryneeverett/django-extensions/contributors","subscribers_url":"https://api.github.com/repos/ryneeverett/django-extensions/subscribers","subscription_url":"https://api.github.com/repos/ryneeverett/django-extensions/subscription","commits_url":"https://api.github.com/repos/ryneeverett/django-extensions/commits{/sha}","git_commits_url":"https://api.github.com/repos/ryneeverett/django-extensions/git/commits{/sha}","comments_url":"https://api.github.com/repos/ryneeverett/django-extensions/comments{/number}","issue_comment_url":"https://api.github.com/repos/ryneeverett/django-extensions/issues/comments{/number}","contents_url":"https://api.github.com/repos/ryneeverett/django-extensions/contents/{+path}","compare_url":"https://api.github.com/repos/ryneeverett/django-extensions/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ryneeverett/django-extensions/merges","archive_url":"https://api.github.com/repos/ryneeverett/django-extensions/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ryneeverett/django-extensions/downloads","issues_url":"https://api.github.com/repos/ryneeverett/django-extensions/issues{/number}","pulls_url":"https://api.github.com/repos/ryneeverett/django-extensions/pulls{/number}","milestones_url":"https://api.github.com/repos/ryneeverett/django-extensions/milestones{/number}","notifications_url":"https://api.github.com/repos/ryneeverett/django-extensions/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ryneeverett/django-extensions/labels{/name}","releases_url":"https://api.github.com/repos/ryneeverett/django-extensions/releases{/id}","created_at":"2015-07-18T05:14:04Z","updated_at":"2015-07-18T05:14:06Z","pushed_at":"2015-07-31T09:21:33Z","git_url":"git://github.com/ryneeverett/django-extensions.git","ssh_url":"git@github.com:ryneeverett/django-extensions.git","clone_url":"https://github.com/ryneeverett/django-extensions.git","svn_url":"https://github.com/ryneeverett/django-extensions","homepage":"http://django-extensions.readthedocs.org","size":2071,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"django-extensions:master","ref":"master","sha":"a4c9c59311e143e65c1d340f9436063be56e245a","user":{"login":"django-extensions","id":65559,"avatar_url":"https://avatars.githubusercontent.com/u/65559?v=3","gravatar_id":"","url":"https://api.github.com/users/django-extensions","html_url":"https://github.com/django-extensions","followers_url":"https://api.github.com/users/django-extensions/followers","following_url":"https://api.github.com/users/django-extensions/following{/other_user}","gists_url":"https://api.github.com/users/django-extensions/gists{/gist_id}","starred_url":"https://api.github.com/users/django-extensions/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/django-extensions/subscriptions","organizations_url":"https://api.github.com/users/django-extensions/orgs","repos_url":"https://api.github.com/users/django-extensions/repos","events_url":"https://api.github.com/users/django-extensions/events{/privacy}","received_events_url":"https://api.github.com/users/django-extensions/received_events","type":"Organization","site_admin":false},"repo":{"id":155815,"name":"django-extensions","full_name":"django-extensions/django-extensions","owner":{"login":"django-extensions","id":65559,"avatar_url":"https://avatars.githubusercontent.com/u/65559?v=3","gravatar_id":"","url":"https://api.github.com/users/django-extensions","html_url":"https://github.com/django-extensions","followers_url":"https://api.github.com/users/django-extensions/followers","following_url":"https://api.github.com/users/django-extensions/following{/other_user}","gists_url":"https://api.github.com/users/django-extensions/gists{/gist_id}","starred_url":"https://api.github.com/users/django-extensions/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/django-extensions/subscriptions","organizations_url":"https://api.github.com/users/django-extensions/orgs","repos_url":"https://api.github.com/users/django-extensions/repos","events_url":"https://api.github.com/users/django-extensions/events{/privacy}","received_events_url":"https://api.github.com/users/django-extensions/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/django-extensions/django-extensions","description":"This is a repository for collecting global custom management extensions for the Django Framework. ","fork":false,"url":"https://api.github.com/repos/django-extensions/django-extensions","forks_url":"https://api.github.com/repos/django-extensions/django-extensions/forks","keys_url":"https://api.github.com/repos/django-extensions/django-extensions/keys{/key_id}","collaborators_url":"https://api.github.com/repos/django-extensions/django-extensions/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/django-extensions/django-extensions/teams","hooks_url":"https://api.github.com/repos/django-extensions/django-extensions/hooks","issue_events_url":"https://api.github.com/repos/django-extensions/django-extensions/issues/events{/number}","events_url":"https://api.github.com/repos/django-extensions/django-extensions/events","assignees_url":"https://api.github.com/repos/django-extensions/django-extensions/assignees{/user}","branches_url":"https://api.github.com/repos/django-extensions/django-extensions/branches{/branch}","tags_url":"https://api.github.com/repos/django-extensions/django-extensions/tags","blobs_url":"https://api.github.com/repos/django-extensions/django-extensions/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/django-extensions/django-extensions/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/django-extensions/django-extensions/git/refs{/sha}","trees_url":"https://api.github.com/repos/django-extensions/django-extensions/git/trees{/sha}","statuses_url":"https://api.github.com/repos/django-extensions/django-extensions/statuses/{sha}","languages_url":"https://api.github.com/repos/django-extensions/django-extensions/languages","stargazers_url":"https://api.github.com/repos/django-extensions/django-extensions/stargazers","contributors_url":"https://api.github.com/repos/django-extensions/django-extensions/contributors","subscribers_url":"https://api.github.com/repos/django-extensions/django-extensions/subscribers","subscription_url":"https://api.github.com/repos/django-extensions/django-extensions/subscription","commits_url":"https://api.github.com/repos/django-extensions/django-extensions/commits{/sha}","git_commits_url":"https://api.github.com/repos/django-extensions/django-extensions/git/commits{/sha}","comments_url":"https://api.github.com/repos/django-extensions/django-extensions/comments{/number}","issue_comment_url":"https://api.github.com/repos/django-extensions/django-extensions/issues/comments{/number}","contents_url":"https://api.github.com/repos/django-extensions/django-extensions/contents/{+path}","compare_url":"https://api.github.com/repos/django-extensions/django-extensions/compare/{base}...{head}","merges_url":"https://api.github.com/repos/django-extensions/django-extensions/merges","archive_url":"https://api.github.com/repos/django-extensions/django-extensions/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/django-extensions/django-extensions/downloads","issues_url":"https://api.github.com/repos/django-extensions/django-extensions/issues{/number}","pulls_url":"https://api.github.com/repos/django-extensions/django-extensions/pulls{/number}","milestones_url":"https://api.github.com/repos/django-extensions/django-extensions/milestones{/number}","notifications_url":"https://api.github.com/repos/django-extensions/django-extensions/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/django-extensions/django-extensions/labels{/name}","releases_url":"https://api.github.com/repos/django-extensions/django-extensions/releases{/id}","created_at":"2009-03-21T16:11:19Z","updated_at":"2015-07-30T20:01:02Z","pushed_at":"2015-07-31T10:09:04Z","git_url":"git://github.com/django-extensions/django-extensions.git","ssh_url":"git@github.com:django-extensions/django-extensions.git","clone_url":"https://github.com/django-extensions/django-extensions.git","svn_url":"https://github.com/django-extensions/django-extensions","homepage":"http://django-extensions.readthedocs.org","size":5354,"stargazers_count":2391,"watchers_count":2391,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":531,"mirror_url":null,"open_issues_count":42,"forks":531,"open_issues":42,"watchers":2391,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/django-extensions/django-extensions/pulls/703"},"html":{"href":"https://github.com/django-extensions/django-extensions/pull/703"},"issue":{"href":"https://api.github.com/repos/django-extensions/django-extensions/issues/703"},"comments":{"href":"https://api.github.com/repos/django-extensions/django-extensions/issues/703/comments"},"review_comments":{"href":"https://api.github.com/repos/django-extensions/django-extensions/pulls/703/comments"},"review_comment":{"href":"https://api.github.com/repos/django-extensions/django-extensions/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/django-extensions/django-extensions/pulls/703/commits"},"statuses":{"href":"https://api.github.com/repos/django-extensions/django-extensions/statuses/218650895f05bb998ecba6d478a9cab6d07260bb"}}}}