/academis-teachertools-api

Tools to facilitate teaching (REST api)

Primary LanguagePython

academis-teachertools-api

Checkout the repository

$ # Clone repository
$ git clone git@github.com:lenarother/academis-teachertools-api.git

Python setup

$ # If you use pyenv with virtualenvwrapper, just use
$ mkvirtualenv academis-teachertools-api

$ # Activate Environment and install
$ workon academis-teachertools-api
$ make devinstall

$ # run tests
$ make tests

Development settings

If you want to use custom settings, change the settings.py in the src/teachertools folder. The file is generated by make devinstall.

If you don't use make devinstall, create the file with the following content:

from teachertools.conf.dev_settings import *

Setup the database for development

Migrate the database:

$ python src/manage.py migrate

Staring the server & superuser

$ # Create a new super user
$ python src/manage.py createsuperuser

Now you can run the webserver and start using the site.

$ python src/manage.py runserver

This starts a local webserver on localhost:8000. To view the administration interface visit /admin/

Deployment

$ heroku login

$ # First time deployment
$ heroku create
$ heroku config:add MY_VARIABLE=secret -a <app-name>
$ heroku config:get MY_VARIABLE -a <app-name>

$ heroku container:login
$ heroku container:push <container-name> -a=<app-name>
$ heroku container:release -a=<app-name> <container-name>