Açıklama Yok

Camille Masset 6d3dacc952 Update README 10 yıl önce
counter 29c07e22b8 Bugfix on counter pages with no seum 10 yıl önce
seum d9cb8267f6 Bugfixes 10 yıl önce
static 93e9947e0e Adde static files for favicon and robots.txt 10 yıl önce
.gitignore d3a09f6087 Added graph of seum activity 10 yıl önce
LICENSE.txt bbd2a4b152 Added license 10 yıl önce
README.md 6d3dacc952 Update README 10 yıl önce
manage.py 8fc3c05f22 First model for seum counter 10 yıl önce
requirements.txt 205d54c02a Chart for JSS 10 yıl önce

README.md

seum-counter

Installation

Clone the repo, then create a virtualenv with Python 3, then install the required packages with :

pip install -r requirements.txt

Then copy and paste the settings file template located in folder seum:

cd seum && cp settings.py.default settings.py

Running the server

Developement

First, comment out the lines below "#Production settings".
Then simply use the django command:

python manage.py runserver 0.0.0.0:8000

Production

Install the packages needed to run an Apache server with wsgi_mod :

sudo apt-get install apache2 libapache2-mod-wsgi-py3

Then add the following content to the file /etc/apache2/sites-available/000-default.conf, inside the <VirtualHost> tag :

Alias /static <path-to-project-folder>/static
<Directory <path-to-project-folder>/static>
     Require all granted
</Directory>

<Directory <path-to-project-folder>/seum>
    <Files wsgi.py>
        Require all granted
    </Files>
</Directory>

WSGIDaemonProcess seum python-path=<path-to-project-folder>:<path-to-project-folder>/<name-of-virtualenv>/lib/python3.5/site-packages
WSGIProcessGroup seum
WSGIScriptAlias / <path-to-project-folder>/seum/wsgi.py

To give Apache the permission to serve the files, execute these three commands :

chmod 664 <path-to-project-folder>/db.sqlite3
sudo chown :www-data <path-to-project-folder>/db.sqlite3
sudo chown :www-data <path-to-project-folder>

To launch or restart the server, simply run :

sudo service apache2 restart