Pltaform to teach and learn.
-
Start up project.
$ vagrant up $ fab environment:vagrant bootstrap
-
Run server.
$ fab environment:vagrant runserver
-
Run worker.
$ fab environment:vagrant runworker
-
Run Daphne
$ fab environment:vagrant rundaphne
-
Run Celery
$ fab environment:vagrant celery
-
Install SpatiaLite if it isn't already installed.
-
Create a virtualenvironment for the project (if it does not exists).
$ mkvirtualenv tandlr $ pip install tox
-
Activate the testing virtual environment.
$ workon tandlr
-
Run the proper command with tox.
# Run the full test suite including the PEP8 linter. $ tox # Run only the test suite. $ tox -e py27-django # Run only the PEP8 linter. $ tox -e py27-flake8 # Pass -r flag to recreate the virtual environment when requirements changes. $ tox -r
-
Deactivate the virtual environment.
$ deactivate
-
Redirect the required domains to your localhost
# /etc/hosts 192.168.33.40 tandlr.local
-
You need connect with a client socket to next URL.
ws://domain.or.address:8888/notifications
There are two types of answer that are returned by the sockets server.
-
Mass notification with/without university
{ "target_action": "mass_notification", "message": "Message defined by admin" }
-
Push notification
/* target_id: Id of object modified. target_type: Class name of object modified, these can be: class mass_notification chat requestclassextensiontime target_action: Action done on object. For example, a class can be: rejected scheduled accepted on course ended pending canceled */ { "target_id": "1", "target_type": "class", "target_action": "accepted" }