Skip to content

Django minor mode for commanding manage.py

Notifications You must be signed in to change notification settings

syohex/django-manage

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 

Repository files navigation

Django Manage

Django minor mode for commanding manage.py

Note

Influenced by Django-mode

How to install

You can install it through Melpa:

package-install RET django-manage RET

Setup

To have package automatically turned on when you go to a Django project. Add the following hook. Otherwise, to call it manually, just run django-manage.

(add-hook 'python-mode-hook 'django-manage-setup)

You can also add a hook to your Html/Js/Css files if you want to be able to run one of the commands such as runserver.

virtualenv

If you develop in a virtualenv but don’t start Emacs from within, you can set the python-shell-interpreter variable to the path of the python binary inside the virtualenv (e.g. venv/bin/python.) This makes sure all your Python packages get loaded from the virtualenv, instead from the globally installed environment. You can do this with M-: (setq python-shell-interpreter "path/to/virtualenv/bin/python"), or using a .dir-locals.el file.

Features

  • Ability to control manage.py, no need to switch to a shell to run commands.
  • Set custom variable django-manage-root for directory where manage.py lives.
  • Command completion is available when running C-c C-x mm
  • Hydra menu showing most commonly used commands. (At least for my setup :P)
  • Select a string you want to translate and press C-c C-x i or call django-insert-transpy. This works in both Python and templates.

Running management commands

Check out the Django menu :) BTW, only one keybinding:

  • C-c C-x Shows the Hydra menu

Hydra Menu

About

Django minor mode for commanding manage.py

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Emacs Lisp 100.0%