# Install Python dependency
sudo pip install -r requirements.txt
# Initialize database
First of all, we have to install mysql
sudo apt-get update
sudo apt-get install mysql-server
(in this step, we have to choose the password for root)
sudo apt-get install python-mysqldb
Then go to configurations/settings.py, edit 'PASSWORD' in DATABASES to password of root
./init_database.sh
# Install sass to compile scss to css when running server
sudo su -c "gem install sass"
If you have multiple Python projects, it's better to setup virtualenv so that each project have its own Python + libraries version. To read about how to do it, refer to documents/setup_project.md
Memcache is an in-memory key-value store, which is widely used for caching.
Memcache has libevent as dependency, so you should install libevent first:
- Download latest stable release of libevent from their site.
- Unzip and cd to the libevent directory
- Run:
./configure && make
sudo make install
wget http://memcached.org/latest
tar -zxvf memcached-1.x.x.tar.gz
cd memcached-1.x.x
./configure && make && make test && sudo make install
python manage.py createcachetable
If you have problem with user avatar (avatar does not show up after uploading), PIL might be the issue To fix it: follow this tutorial.
./runsass.sh
# Now the website should be available at http://localhost:8000/
This script will run webserver, as well as auto compile our scss to css.
Create a file named settings_local.py in configurations and follow the format of settings_local_example.py to store local settings (use your own database password)
We have 2 sets of tests:
- Unit test. To run:
python manage.py test
- Functional testing: Please refer to functional_tests/README.md for details on how to setup + run.
- Nguyen Thanh Trung
- Nguyen Hoang Yen
- Truong Minh Bao
- Le Hong Quang
- Nguyen Duc Nam
- Che Quoc Huu
- Tran Phan Anh Khoa
- Nguyen Xuan Tung
- Duong Thanh Dat
- Nguyen Tan Sy Nguyen