sponsor Vim development Vim logo Vim Book Ad

Django helper utils : Url tag jump, template path import and html client dump

 script karma  Rating 0/0, Downloaded by 298    Comments, bugs, improvements  Vim wiki

created by
Michael Brown
 
script type
utility
 
description
repo here: http://github.com/mjbrownie/django_helper.vim/tree/master

#note. This is only tested on linux with python support. in my ~/.bashrc I have the following line which allows django modules to be imported

export DJANGO_SETTINGS_MODULE=settings

Resolve a url to a tag

Usage

for a given django url path

urlpatterns(
'/some/url/path', 'some.django.view.function_name'
)

:DUrlTag /some/relative/path/

will resolve the path to the function and then call
:tag function_name

You need to have an up to date tags file and the command might choke on
complicated views with lots of decorators etc.


:DClient /some/relative/path/

will dump the html in a scratch window split

if settings.py is in the root  of the path this script will :set path+= all template directories including INSTALLED_APPS,

so you can 'gf' to template files
 
install details
 

rate this script Life Changing Helpful Unfulfilling 
script versions (upload new version)

Click on the package to download.

package script version date Vim version user release notes
django_helper.vim 0.1 2009-09-09 7.2 Michael Brown Initial upload
ip used for rating: 54.163.70.249

If you have questions or remarks about this site, visit the vimonline development pages. Please use this site responsibly.
Questions about Vim should go to the maillist. Help Bram help Uganda.
   
SourceForge.net Logo