Example Django application using the django-lti-provider library.
Clone
git clone https://github.com/ccnmtl/django-lti-provider-example.git cd django-lti-provider
Create the database
For Postgres:
createdb djangoltiproviderexample
Customize settings
djangoltiproviderexample
subdirectory ORdjangoltiproviderexample/local_settings.py.example
to djangoltiproviderexample/local_settings.py
settings_shared.py
that you need to customize for your local installation.
The PYLTI_CONFIG
variable in your local_settings.py
configures the application consumers and secrets. Generate two long random numbers for these values.
PYLTI_CONFIG = {
'consumers': {
'<random number string>': {
'secret': '<random number string>'
}
}
}
Build the virtual environment
make
will build the virtualenv
Migrate the database
./manage.py migrate
Run
make runserver
Canvas installation happens in two steps. First, as a Canvas admin-level user, you must install the LTI tool's Developer Key. Then, as a Course admin, you install the LTI App within the course.
In Canvas, go to Settings -> Developer Keys. Click "+ Developer Key", and choose LTI Key.
Fill out the following fields:
https://<your hostname>/lti/launch/
https://<your hostname>/lti/launch/
https://<your hostname>/lti/login/
/lti/jwks/
route)Select LtiDeepLinkingRequest where possible, as this allows for deeper integration.
In Canvas, go to Settings -> Apps. Click "View App Configurations". Click "+ App" to add a new App.
You should now see your app present in the left-hand menu in Canvas's course page, if the right placement setting was selected when it was installed.
More info is here, which may be helpful:
https://<app hostname>/lti/config.xml