   :ensure t
   :config
   (defun my/set-pyvenv-workon ()
-    (local-set-key (kbd "C-c C-w") #'pyvenv-workon)
-    (local-set-key (kbd "C-c C-d") #'pyvenv-deactivate))
+    (local-set-key (kbd "C-c C-d") #'pyvenv-deactivate)
+    (local-set-key (kbd "C-c C-w") #'pyvenv-workon))
   (add-hook 'python-mode-hook #'my/set-pyvenv-workon))
 
 ;; The warning message is very annoying, let's get rid of it

        (inferior-python-mode)))))


;; The ideal binding for this is C-c C-r, which is unfortunately bound
;; to python-shell-send-region. Since that's kind of a stupid matter,
;; I should code a function python-shell-send-region-or-buffer-dwim
;; which could be bound to C-c C-c and then I could use C-c C-r for
;; "running" the project.
(defun my/add-python-execute ()
  "Add a Python execute file key binding to the buffer."
  (local-set-key (kbd "C-c C-r") #'spacemacs/python-execute-file))

;; Well, I guess I fixed the C-c C-c issue. So let's use an
;; appropriate key binding for running the file
(add-hook 'python-mode-hook #'my/add-python-execute)

;; python-django seems to work quite ok with it.
(use-package python-django

                                  send-main
                                  msg)))))

;; While the former function is pretty ok with everything and you
;; don't lose any functionality, it's kind of a bummer that you have
;; to C-c C-p before sending the buffer. Why can't we just C-c C-c and
;; create a Python shell if there isn't one active? Let's just take
;; the magnars approach here: Don't wait for anyone to fix it, just
;; code it and be happy. It kind of sucks that print statements show
;; before completion the first time the command is run, but I'm fine
;; with that. I'd rather not have to hit C-c C-p before C-c. Elpy
;; really got a lot of this right.
(defun python-shell-send-dwim (&optional send-main msg)
  (interactive (list current-prefix-arg t))
  (condition-case nil
      (call-interactively 'my/python-shell-send-dwim)
    (error (progn
             (run-python (python-shell-calculate-command) nil t)
             (call-interactively 'my/python-shell-send-dwim)))))

;; There's a great approach to the "run project" problem in Spacemacs
;; that I thought is very valuable. Just set a hotkey to run the
