Skip to content
This repository has been archived by the owner on Sep 19, 2024. It is now read-only.

Latest commit

 

History

History
60 lines (59 loc) · 1.69 KB

INSTALL.md

File metadata and controls

60 lines (59 loc) · 1.69 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
pip install git+https://github.com/nkunihiko/django-bootstrap3-datetimepicker.git

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 makemigrations
python manage.py migrate

Collect all the static files for fast serving

python manage.py collectstatic

Run server

python manage.py runserver