First off, thank you for asking this question, as it forced me to figure this out myself and it's great!
Here is the page I used as a reference: PySmell v0.6 released : orestis.gr
- Install PySmell using the setup.py installcommand.
- Generate the PYSMELLTAGSfile for django by going to yoursite-packages/djangodirectory and running:pysmell . -o ~/PYSMELLTAGS.django
- Copy that file to your project directory, and then ran pysmell .to generate the project PYSMELLTAGS file
- Make sure pysmell is in your PYTHONPATH(export PYTHONPATH=${PYTHONPATH}:/path/to/pysmell/)
- Run vim (vim .)
- Source pysmell.vim(:source /path/to/pysmell/pysmell.vim)
- Set the autocomplete command (:set omnifunc=pysmell#Complete)
- Type ^x^o to autocomplete and it should work
I realize this is not a sustainable solution, but you should be able to use this as a start to getting it setup to always work (e.g., add the export to your .bashrc, add the :source to your .vimrc, setup autocmd FileType python set omnifunc=pysmell#Complete, etc.)
Let me know if this is enough to get you started. It worked for me!
Edit
I simply added this to my .vimrc and as long as the PYSMELLTAGS & PYSMELLTAGS.django files are in my project root, it works fine without any other work:
python << EOF
import os
import sys
import vim
sys.path.append("/usr/local/python/lib/python2.5/site-packages")
EOF
exe ":source ~/src/pysmell/pysmell.vim"
autocmd FileType python set omnifunc=pysmell#Complete