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:
- Create a database user/password (if needed)
- Create the database
createdb django-lti-provider-example
For MySQL: @todo
-
Customize settings
-
Create a local_settings.py file in the
djangoltiproviderexample
subdirectory OR -
Copy
djangoltiproviderexample/local_settings.py.example
todjangoltiproviderexample/local_settings.py
-
Then, override the variables from
settings_shared.py
that you need to customize for your local installation.- Customize your
DATABASES
dictionary- e.g. set NAME, HOST, USER, and PASSWORD. remove PORT (unless it's non-standard)
- Specify ALLOWED_HOSTS = [ 'localhost', '.your.blackboard.or.moodle.domain', '.your.workstation.domain', ]
- Customize your
-
The
PYLTI_CONFIG
variable in yourlocal_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
- https://community.canvaslms.com/docs/DOC-13117-415274482
- Note: the URL to enter in these steps will be
https://<app hostname>/lti/config.xml
- Note: the URL to enter in these steps will be