-
Notifications
You must be signed in to change notification settings - Fork 248
get up and running
- git the code
- python bootstrap.py
- bin/buildout
- bin/django syncdb —migrate
- bin/django loaddata full_data.json
- bin/django runserver
- and you’re up and running
Before you can properly build the project you may want to install certain packages, by running the following:
sudo apt-get install python2.6-dev git-core django python-django \ python-django-doc python-psycopg2
This was tested on Ubuntu 9.10 Server (Karmic Koala)
Packages tested on Ubuntu 10.04:
python2.6-dev
python2.6
git-core
git-gui
git-doc
python-django
python-django-doc
python-psycopg2
python-setuptools
python-imaging
Note that if you’ve tried the system with sqlite3 and you now want to move to a real database such as PostgreSQL, or perhaps to MySQL, you will need to do the following:
- Create a database (Character set: UTF8), and create a user + password for the database.
- Make sure the database is accessible with the above credentials and settings
- Modify the file src/knesset/settings.py to specify the database settings
- Perform steps 4 and 5 above
Assumptions:
- The site was extracted in your home directory
- Your username and group are foo and bar respectively
- You are using Ubuntu or Debian
- We will create this configuration file in /etc/apache2/sites-available/oknesset
Here’s a sample file to get you started quickly with wsgi.
<VirtualHost *:80> ServerAdmin [email protected] ServerName mycoolserver.com #ServerAlias www.mycoolserver.com Alias /static /home/foo/Open-Knesset/static LogLevel warn WSGIScriptReloading on WSGIDaemonProcess tzafim.org processes=2 maximum-requests=500 threads=1 user=foo group=bar WSGIProcessGroup tzafim.org WSGIScriptAlias / /home/foo/Open-Knesset/deploy/knesset_wsgi.py <Directory /home/food/Open-Knesset/static> Order deny,allow Allow from all </Directory> </VirtualHost>
Now enable the site and restart Apache:
a2ensite oknesset service apache2 restart
You may now access http://mycoolserver.com and play around with the site
If you’ve built this project several months ago, it’s safer to run the following:
rm -rf parts/ eggs/ bin/ downloads/ src/Open_Knesset.egg-info/ develop-eggs/
Don’t sudo-run this in yout root directory :-)
Those directories are not tracked (they’re in .gitignore
), and erasing them before you checkout the files makes sure you get the latest versions of all eggs and parts.