Version 7 (modified by 13 years ago) ( diff ) | ,
---|
1. Installation & Configuration
1.1 Python
This project runs on Python, so let's install that first. Let's also install some required packages at the same time.
$ sudo apt-get install python python-pygame python-numpy
(Make sure you get Python 2.7 due to compatibility with used plugins.) Pygame is used as backend for rendering our heatmap images, and numpy is used for some calculations within the code.
1.2 MySQL & MySQLdb
Set up a MySQL server to your liking. Make sure you get as minimal version 3.23-5.1 due to the MySQLdb support. Then create a database for django_gheat.
$ sudo apt-get install mysql-server $ sudo mysqladmin password password $ echo "CREATE DATABASE project_heatmap;" | mysql -uroot -ppassword
Now get the latest MySQLdb, make sure it's higher than 1.2.1p2.
$ sudo apt-get install python-mysqldb
1.3 Django
Get Django 1.3 from here or check for a newer version here, then:
$ tar xzvf Django-1.3.tar.gz $ cd Django-1.3 $ sudo python setup.py install
1.4 Django extensions
Get the Django extensions from here.
$ tar xzvf <tarball> $ cd django-extensions $ python setup.py install
1.5 Django_gheat
Get the latest django_gheat from the repository
# cd to where you want 'django_gheat' to be located $ svn co http://svn.wirelessleiden.nl/svn/projects/Heatmap/src/django_gheat/ $ cd django_gheat/
Open ./settings.py
, look for the 'DATABASES' section and edit the following lines:
# If you are using MySQL with MySQLdb, don't edit this line. # If you are using a different database, replace 'mysql' with 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'. 'ENGINE': 'django.db.backends.mysql', # The name of your database, or the path to your database file if you are using sqlite3. 'NAME': ' ', # Connection settings for your database. Not used with sqlite3 'USER': ' ', 'PASSWORD': ' ', 'HOST': ' ', 'PORT': ' ',
You are now ready to populate the database; Models & Data import