Website for the University of Southampton Electronics and Computer Science Society
https://society.ecs.soton.ac.uk
To find out more about models of ecssweb, see the wiki
-
Requires Python 3 to run the Django 2.0 project
-
python3-saml
requiresxmlsec
, it needs some pre-install steps:On Mac:
brew install libxml2 libxmlsec1
On Linux (Debian):
apt-get install libxml2-dev libxmlsec1-dev libxmlsec1-openssl wget http://xmlsoft.org/sources/libxml2-2.9.1.tar.gz tar -xvf libxml2-2.9.1.tar.gz cd libxml2-2.9.1 ./configure && make && make install
If it fails you might need to run
apt-get install python3-dev
and then try again.For other platforms see https://github.com/mehcode/python-xmlsec#pre-install
-
Install the packages in
requirements.txt
pip install -r requirements.txt
-
Rename
ecssweb/settings.example.py
tosettings.py
and changes the settings in it -
After migrate database schema, load initial data using
python manage.py loaddata init_data.example.yaml
-
Rename
ecsswebauth/saml_config/settings.example.json
tosettings.json
and changes the settings in it -
Put your X.509 certs in
ecsswebauth/saml_config/certs/
name themsp.crt
andsp.key
You can run this to generate your certs:
openssl req -new -x509 -days 3652 -nodes -out sp.crt -keyout sp.key
For more information, see https://github.com/onelogin/python3-saml
You can setup cron job to perform regular maintenance tasks:
-
Clear the inactive sessions and non-persistent users from the database
-
Sync upcoming events with Facebook
-
Give the
maintenance.sh
script execute permissionchmod u+x maintance.sh
-
Run
crontab -e
to open the text editor and add the following line:0 0 * * * /path/to/project/maintenance.sh /path/to/python/env/ /path/to/project/
This makes the maintance script runs every day at midnight
Licensed under the MIT license.