From 73ca5feaa9c92ab6eb99d2903d23036df95ff54c Mon Sep 17 00:00:00 2001 From: lxsameer Date: Mon, 23 May 2011 15:39:09 +0430 Subject: [PATCH] shell mode added --- src/modes/django-mode.el | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/modes/django-mode.el b/src/modes/django-mode.el index 8598edb..8f9e14a 100644 --- a/src/modes/django-mode.el +++ b/src/modes/django-mode.el @@ -73,6 +73,7 @@ binding for Kuso IDE django plugin" "Initialize the keymap for django plugin." (define-key django-map (kbd "") 'django-runserver) (define-key django-map (kbd "") 'django-syncdb) + (define-key django-map (kbd "\C-c s") 'django-shell) ;; (define-key django-map (kbd "\C-x p f") 'django-buffer) ) @@ -87,6 +88,7 @@ binding for Kuso IDE django plugin" (define-key-after global-map [menu-bar django manage syncdb-extra] '("Syncdb with extra options" . django-syncdb-extra) 'syncdb) (define-key-after global-map [menu-bar django manage custom-command] '("Custom Command" . django-command) 'syncdb-extra) + (define-key-after global-map [menu-bar django shell] '("Project shell" . django-shell) 'manage) (define-key-after global-map [menu-bar django sep2] '("--") 'runserver-extra) ) @@ -165,6 +167,11 @@ binding for Kuso IDE django plugin" (interactive "sEnter extra arguments for runserver: ") (django-runserver args) ) +(defun django-shell () + "Running Django shell." + (interactive) + (manage-command "*Shell*" "Shell" "shell") +) (defun django-command (command) "Run the specified command with manage.py"