[wingide-users] Django Template Browser
support at wingware.com
Fri Feb 21 11:10:06 EST 2014
Adi Sieker wrote:
> nearly all of the Python work I do is Django work and I've recently,
> had an idea that would help me tremendously when working with Django
> and that is a Django Template Browser.
> What it would do is display all available templates from the list of
> INSTALLED_APPS as a tree. It would then check which templates have
> been redefined in the TEMPLATE_DIRS directory. Each template getting
> an indicator if it was redefined or not. Templates that are in the
> TEMPLATE_DIRS but not in the INSTALLED_APPS would also be added to the
> tree. Right clicking on a template would display a pop up that either
> allows me to redefine the template or delete the redefinition. If I
> redefine the template Wing should read the contents of the template in
> the apps location and create a new template with the content of the
> original template in my TEMPLATE_DIRS directory and matching the path
> of the original template.
> In the below mockup, which is not complete, the templates with [-] are
> not redefined and the ones with [+] are redefined.
> Double clicking on a template would open the redefined template if it
> exists otherwise the original template and right clicking on a
> redefined template would give me the option to open the original template.
> I have no idea if this is feasible as an extension or not, but I would
> love to see something like that in Wing.
Based on my own experience w/ Django templates this sounds like a very
useful feature. I think it would be quite possible to implement it as
an extension script if someone wants to try it, based on
scripts.pylintpanel.py in the Wing installation for creating the new tool.
Or, a few scripts might be added to scripts/django.py that just add menu
items to the Project's context menu (using kContextProject GUI Context
described in http://wingware.com/doc/scripting/syntax ). That would
work slightly differently than what you describe above but could still
provide the same overall functionality in the context of the Project tool.
I'll add this to our list but of course it'll be prioritized w/
everything else so we probably won't work on it in the immediate future.
Wingware | Python IDE
The Intelligent Development Environment for Python Programmers
More information about the wingide-users