Skip to content

grp6-genlog/cool

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 

Repository files navigation

Carpooling system application
INGI2255-SINF2255

  group 6 2010-2011

    Cyrille Dejemeppe
    Jorick Flabat
    Benjamin Hesmans
    Francois-Xavier Mouthuy
    Jawira Portugal
    Fiacre Setondji Kinmagbahohoue
    Martin Trigaux
    Remy Vandaele




HOW DOES THE APP WORKS
----------------------
The Django project has the following structure :

    apache/
    \--django.wsgi
    
    evaluations/
    \--admin.py
    \--__init__.py
    \--models.py
    \--views.py
    
    media/
    modules/
    \--evaluationmanager.py
    \--findpair.py
    \--...
    
    offers/
    profiles
    proposals/
    requests/
    rides/
    templates/
    __init__.py
    manage.py
    reset_db.py
    settings.py
    urls.py
    views.py


__init__.py : as for each python application, started at the server launch
manage.py : file used to run the server in developpement area, run a django shell, manage the apps and database tables,... It is used only for the developpement and tests.
reset_db.py : empty every table and create a new super user which can access the admin pannel
settings.py : configuaration of the project. Indicates which apps to load, how to access the database, enable the debug mode,...
urls.py : every regex to match an url with the function defined in a a views.py file. At the server start, every module is launched.
views.py : contains every functions to execute when called by the urlconf. Should return a HTML page.
The apache folder contains a file for the execution of the django project by the apache server
Every module in the model which needs to be present in the database is created in a subfolder (evaluations, offers, profiles, proposals, requests and rides). The admin.py file contains informations to allow us to modify this part of the database in the admin pannel, models.py the structure of the database and views.py the functions called by the URLConf related to this module.
In the modules subfolder, every manager present in the logical architecture is implemented as well as some utilities functions.

database_graph.png is a graph representing the structure of the database


INSTALLATION PROCEDURE
----------------------
REQUIEREMENT :
    Python 2.6 or above
    Django 1.2
    MySQL 5
    Apache (optional)
    SMTP server (optional)
    
To fit the database configuration with the one installed on your computer, modify the settings.py file at the root of the django project by setting the engine, name, user, password and host of the database into the DATABASE dictionnary. Once done, run the manage.py file with the following syntax :
    $ python manage.py syncdb
    
To allow smartphones to access the tracker, the public IP address of the server needs to be specified in the webiste/modules/tracker.py file at the SERVER_IP line.

The software can be run in the developpement mode easily by executing the manage.py file with the following syntax :
    $ python manage.py runserver
The full application can be run that way and is accessible on http://127.0.0.1:8000/

    
To run the application with Apache, you need to first add the site in the apache configuration file (/etc/apache2/sites-available/default on ubuntu)

<VirtualHost *:80>
    
	ServerAdmin admin@admin.net
	DocumentRoot /PATHTOTHEAPP      # replace by the path of the application, if clone from git repository should end by cool/website/
	LogLevel error
    
    WSGIDaemonProcess site-1 user=user group=users threads=25    # replace by your user and group
    WSGIProcessGroup site-1
    
	WSGIScriptAlias / "/PATHTOTHEAPP/apache/django.wsgi"

	<Directory "/PATHTOTHEAPP/apache">
		Order deny,allow
		Allow from all
	</Directory>

    Alias /media/ "/usr/share/pyshared/django/contrib/admin/media/"     # replace by the path of your django software if different
    <Directory "/usr/share/pyshared/django/contrib/admin/media/">
    Order allow,deny
    Options Indexes
    Allow from all
    IndexOptions FancyIndexing
    </Directory>

</VirtualHost>

To send the emails with apache, you will need to have a mail server running such as sendmail or postfix.

About

a Car pOOLing support system

Resources

Stars

Watchers

Forks

Packages

No packages published