-
Notifications
You must be signed in to change notification settings - Fork 3
Installation Instructions
-
Install conda via the official instructions for your OS. If you would like a more lightweight installation, you can use alternatively miniconda. You will also need to have Git installed on your system. If you are on Windows, you can install Git from here. Administrator privileges are not required for the installation.
-
Clone this repository at your desired location by running the following commands in your terminal. If you are in Windows run them in the Anaconda Prompt.
git clone https://github.com/IonMich/instructor_pilot.git cd instructor_pilot
-
Create a conda environment:
conda update -n base -c defaults conda conda env create --file environment.yml --name django-ta
This will take approximately 10 minutes on Windows and 5 minutes on Unix-based systems. You can replace
django-ta
with the environment name of your choice above and in what follows. After this command successfully completes, you can free up disk space by runningconda clean -a
(this will remove all installation caches). -
Activate the environment:
conda activate django-ta
-
Your cloned repository contains a file named
.env.example
which contains four environment key-value pairs. Rename the file to.env
(without.txt
), and edit the values of the following keys:-
API_URL
: The URL of your Canvas instance of your institution. If you are a UF member, use"https://ufl.instructure.com/"
. -
API_KEY
: To connect to Canvas, you will need to create a Canvas API token. You can do this by going to your Canvas Account Settings and clicking on theNew Access Token
button of the "Approved Integrations" section. Copy this token and paste it in the.env
file as the value of theAPI_KEY
key. -
DJANGO_SECRET_KEY
: This is a secret key used by Django to encrypt data. You can generate one by running the following command in your terminal:python -c "from django.core.management.utils import get_random_secret_key; print(get_random_secret_key())"
-
ENV_TYPE
: This should be set to"dev"
. No need to change it.
-
-
Initialize the Django app by adding a username and password for the admin account:
python manage.py makemigrations python manage.py migrate python manage.py createsuperuser
-
Run the Django app:
python manage.py runserver
-
Open your browser and go to
http://127.0.0.1:8000/admin/auth/user/1/change/
. Log in with the username and password you created in the previous step. Then add your information in theFirst name
andLast name
fields and save it - your last name will be used if you are UF member to get your section class meeting times from the UF API. Feel free to add your institutional email address in theEmail address
field as well. -
All set! You can now go to
http://127.0.0.1:8000/
to add a course and start using the app.
Note
This app now has an experimental React front-end, which will eventually replace the existing front-end. More details here. All new Python dependencies are already included in the environment.yml
file installed above. However, the new front-end introduces additional Javascript dependencies via npm
. If you would like to test the new User Interface, follow the additional instructions here:
If you are only interested in the stable User Interface (most users), ignore these additional installation instructions, but keep an eye on the relevant discussion and Wiki pages, as the old front-end will eventually be deprecated.