1

Resolved

Django template intellisense requires VS restart after rebuild intellisense database

description

SETUP (not 100% sure on the order):

Install VS 2012
Install PTVS
Install Enthought Free dist
(used PTVS for a while)
Install Django


STEPS:

Created a django project. Make sure that html template intellisense is not working:

When editing an html template, intellisense doesn't come up when adding a | after 'content', or when adding a {% and a space. In manage.py, importing django and then django. did not bring up intellisense (db out of date message).

Tools->Options->Python->Rebuild DB

Wait until it's done (check task mgr). Try again to use intellisense in django html file, still doesn't work. Try to use django module from a .py file (manage.py), that works.

Restart VS. Try to use intellisense in django html file -> it now works.


EXPECTED:

We should not require a restart of VS for intellisense in django templates to start working.

We should display a message on the status bar when intellisense is not available in django templates (similar to what is done for regular .py files).

a. If no completion and we detect that he analyzer process is running.
b. If no completion and analyzer process is not running, let the user know that he should rebuild the intellisense DB (ideally we do it for them)

comments

Zooba wrote Mar 17 at 2:50 PM

This is because we have two codepaths on Django project load based on whether a DB exists. For the case where it does not exist, we may have to subscribe to the completed event and update the hooks.