Its super easy to set up our development environment
Install python-pip
, python-dev
and virtualenvwrapper
sudo apt-get install python-pip python-dev
sudo pip install virtualenvwrapper
You can clone it directly from https://github.com/amfoss/website
git clone https://github.com/amfoss/website.git
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
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
Copy the local-settings.py
from conffiles
to fossWebsite
directory.
cp conffiles/local-settings.py fossWebsite/local_settings.py
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
python manage.py runserver