I'm new to emacs, but I know how to navigate the basics. I just want to integrate Django with emacs 24 on ubuntu. Django-mode seems to be the only game in town, but is there a tutorial written in more complete steps? A typical use case would be someone who is not an expert in emacs but wants to add Django support for emacs.
I have virtualenv and virtualenvwrapper everything is configured correctly. But django-mode does not detect my virtualenv no matter what I do.
I have big problems with the paragraph below regarding Directory local variables, as the documentation is poorly written. Is this .dir-locals.el file optional? Many of his explanations are confusing. Do I need iPython? I would not have thought, but I assume that the python-shell interpreter is not optional. I created the .dir-locals.el file and added my virtualenv path, but django-mode does not detect my virtualenv. Emacs says: virtualenv none.
There are also screenshots from the menu bar, which allows you to use many neat things, for example, launching /./manage.py collectstatic, etc., but not mentioning how to activate the menu. This may be the basic emacs command, but I don’t know it and would appreciate it if someone would show me how to configure emacs using django.
Are there any other alternatives or django mode is the way to go? I missed a huge piece of documentation (e.g. hiding inside emacs).
Thanks!
Local Directory Variables Now we have all set there a really important topic of discussion and local directory variables.
python.el are local variables of the local directory and support directory-based configurations, so understanding this topic is important. Therefore, I suggest you familiarize yourself with the corresponding part of the manual with M-: (information "(emacs) Directory Variables").
The .dir-locals.el file is a file containing a list of associations, but don't let the name scare you, the following is a pretty complete example of what I use to open the current project.
((python-mode (python-shell-interpreter. "python")
(python-shell-interpreter-args. "/home/fgallina/Code/Projects/anue-site/anue/manage.py shell")
(python-shell-prompt-regexp. "In \ [[0-9] + \]:")
(python-shell-prompt-output-regexp. "Out \ [[0-9] + \]:")
(python-shell-complete-setup-code. "from IPython.core.completerlib import module_completion")
(python-shell-complete-module-string-code. "';'. Join (module_completion ('' '% S' '')) \ n")
(python-shell-complete-string-code. "';'. Join (get_ipython () Completer.all_completions ('' '% S' '').) \ ")
(Python-shell-extra-pythonpaths "/ main / fgallina / Code / Projects / anue-site / anue / applications /")
(python-shell-virtualenv-path. "/home/fgallina/.virtualenvs/anue")))
http://from-the-cloud.com/en/emacs/2013/01/28_emacs-as-a-django-ide-with-python-djangoel.html