Important
To use PyScada in developer mode, you should install it using the pip editable mode (-e)
For developers¶
Activate PyScada virtual environment¶
source /home/pyscada/.venv/bin/activate
Cloning the repository¶
git clone git@github.com:pyscada/PyScada.git
For a plugin like PyScada-Modbus :
git clone git@github.com:pyscada/PyScada-Modbus.git
Pip editable installation¶
After activating the virtual environment :
sudo -u pyscada -E env PATH=${PATH} pip3 install -e ./PyScada
For a plugin like PyScada-Modbus :
sudo -u pyscada -E env PATH=${PATH} pip3 install -e ./PyScada-Modbus
Restarting the application¶
After activating the virtual environment, to apply you changes, depending on them, may need to :
create migrations
python3 /var/www/pyscada/PyScadaServer/manage.py makemigrations
apply them
python3 /var/www/pyscada/PyScadaServer/manage.py migrate
copy static files (answer yes).
sudo -u pyscada -E env PATH=${PATH} python3 /var/www/pyscada/PyScadaServer/manage.py collectstatic
Then you can :
For urls, views or admin changes, restart gunicorn.
sudo systemctl restart gunicorn
Otherwise restart PyScada.
sudo systemctl restart pyscada