Installation

Get the code

You can install Django Gears with pip:

$ pip install django-gears

It’s strongly recommended to install Django Gears within an activated virtualenv.

If you want to work with the latest version of Django Gears, install it from the public repository:

$ pip install -e git+https://github.com/gears/django-gears@develop#egg=django-gears

Add to settings

Add django_gears to your INSTALLED_APPS settings:

INSTALLED_APPS = (
    #  ...
    'django_gears',
    #  ...
)

Configure development urls

from django_gears.urls import gears_urlpatterns

# url definitions here

urlpatterns += gears_urlpatterns()

Note

If you use Django’s staticfiles_urlpatterns, you should replace that with gears_urlpatterns. Django Gears falls back to serving static files when matching assets aren’t found.

Moving on

Congratulations. You have a working installation. Now, continue to the tutorial to learn how to use Gears in your templates.