Skip to content

Installation

Starting a new project?

Consider using django-gesha-template, which is pre-configured with django-gesha and a pipeline for TypeScript integration.

Install to Python environment using pip

$ pip install django-gesha

Install app in Django project

Add gesha to INSTALLED_APPS in your Django project's settings:

settings.py
INSTALLED_APPS = [
    ...
    "gesha",
]

Collect JavaScript assets

Run collectstatic to collect django-gesha's JavaScript files.

$ python manage.py collectstatic
Static file discovery

Django should locate django-gesha's JavaScript files automatically once the app is installed.

To check that the JavaScript bundle has been collected:

$ python manage.py findstatic gesha/dist/js/django-gesha.bundle.min.js
C:\> python manage.py findstatic gesha\dist\js\django-gesha.bundle.min.js

Advanced

Install to Node.js environment

$ npm install https://github.com/ely-as/django-gesha

Import in TypeScript

For example, in your main entry-point:

main.ts
import "django-gesha";

...

This would eliminate the need to collect JavaScript assets and load them in your HTML template.