Create tern projects for django applications.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
test
.coveragerc
.gitignore
.python-version
.travis.yml
Cask
LICENSE
MANIFEST.in
README.rst
setup.py
tern-django.el
tern_django.py
tox.ini

README.rst

Tern Django

Build Status Coverage Status Requirements Status Melpa Melpa Stable

Create Tern projects for Django applications.

Use awesome Tern auto-complete to develop your Django project with zero configuration.

Obviously all javascript code of application stored in application static folder. So we can write standard .tern-project file into application root if static folder exists. We can extend this project looking into application templates. We can add javascript from other applications or download external library from internet and make it accessible for tern.

Installation

You can install Emacs package from Melpa:

M-x package-install RET tern-django RET

Or you can install python script only from Pypi:

pip install tern-django

Usage

Setup your project variables and run tern-django command:

M-x setenv RET DJANGO_SETTINGS_MODULE RET project.settings
M-x setenv RET PYTHONPATH RET /home/user/path/to/project/
M-x tern-django

In case you install it as python package activate your development environment and run tern_django.py script.

. /path/to/project/virtual_env/bin/activate
export DJANGO_SETTINGS_MODULE=project.settings
export PYTHONPATH=/path/to/project
tern_django.py

Contributing

Attach tern_django.py output with debug option enable to any bag report. You can customize tern-django-debug variable within Emacs. Or directly run script with --debug option.

Known issues

If script randomly fails with following message:

OperationalError: database is locked

Check that your sqlite installation was compiled with HAVE_USLEEP flag enabled.