Skip to content

Latest commit

 

History

History
58 lines (57 loc) · 1.58 KB

INSTALL.md

File metadata and controls

58 lines (57 loc) · 1.58 KB

Development Environment

Its super easy to set up our development environment

Collect Pre-requisites

Install python-pip, python-dev and virtualenvwrapper

sudo apt-get install python-pip python-dev
sudo pip install virtualenvwrapper

Get the files

You can clone it directly from https://github.com/amfoss/website

git clone https://github.com/amfoss/website.git

Setup development environment

First, some initialization steps. Most of this only needs to be done one time. You will want to add the command to source /usr/local/bin/virtualenvwrapper.sh to your shell startup file (.bashrc or .zshrc) changing the path to virtualenvwrapper.sh depending on where it was installed by pip.

export WORKON_HOME=~/Envs
mkdir -p $WORKON_HOME
source /usr/local/bin/virtualenvwrapper.sh

Lets create a virtual environment for our project

mkvirtualenv foss
workon foss

Install requirements

All the requirements are mentioned in the file requirements.txt.

pip install -r requirements.txt

Local settings

Copy the local-settings.py from conffiles to fossWebsite directory.

cp conffiles/local-settings.py fossWebsite/local_settings.py

Setup database

In the development phase, we use sqlite3.db. We need to create a folder named db in-order to store our temporary db file.

mkdir db && touch db/db.db

Setup tables in the DB

python manage.py syncdb

Collect all the static files for fast serving

python manage.py collectstatic

Run server

python manage.py runserver