wget https://bootstrap.pypa.io/get-pip.py
sudo python get-pip.py
sudo pip install django==1.7.4
sudo pip install paho-mqtt
mosquitto -p 12001
python manage.py runserver 0.0.0.0:11000
python manage.py migrate
python manage.py createsuperuser
sudo mkdir -p /etc/uwsgi/sites
cd /etc/uwsgi/sites
sudo vim csa-site.ini
[uwsgi] │ 1 Consumer Sustainability Analytics - Central IoT Server
chdir = /home/steven/csa-site │ 2 ===========
module = csasite.wsgi:application │ 3
│ 4 ### Contributing
master = true │ 5
processes = 5 │ 6 ##### Setting up Django for local development
│ 7 ```
socket = /home/steven/csa-site/csasite.sock │ 8 wget https://bootstrap.pypa.io/get-pip.py
chmod-socket = 664 │ 9 sudo python get-pip.py
vacuum = true
python manage.py collectstatic
service uwsgi start
https://docs.djangoproject.com/en/1.7/internals/contributing/writing-code/coding-style/
- Use underscores, not camelCase, for variable, function and method names (i.e. poll.get_unique_voters(), not poll.getUniqueVoters)
POSTing data
- curl -v -H "Content-Type: application/json" --data '{"entry_date":"1", "sensor_location":"here"}' localhost:11000/api/v1/entry/
- hardcoded {{ STATIC_URL }} in...
- plugins/freeboard/freeboard.widgets.js
- plugin for sparkline
- css/freeboard.css
- line 2246, img/dropdown-arrow.png
- lib/css/freeboard/styles.css
- line 1051, 1075, img/glyphicons
- line 1896, img/dropdown-arrow.png
- plugins/freeboard/freeboard.widgets.js