Follow this guide to setup your development machine.
-
Install git, postgresql and virtualenv, in your computer, if you don't have it already.
-
Ensure that python3-dev and libpq are installed on your system.
# if you are using a debian based os for development run: sudo apt-get install -y python3-dev python3-pip libpq-dev libjpeg-dev
-
Get the source code on your machine via git.
git clone https://github.com/pythonindia/wye.git
-
Create an isolated python 3 environment and install python dependencies.
cd wye virtualenv -p $(which python3) venv source venv/bin/activate # run this command everytime before working on project pip install -r requirements/dev.txt
-
Copy over
settings/dev.sample.py
tosettings/dev.py
.cp settings/dev.sample.py settings/dev.py
-
Change credential in setting/dev.py
nano settings/dev.py
For new postgresql user
USER: "postgres";PASSWORD: ""
-
Create an empty postgres database and run database migration.
createdb wye python manage.py migrate python manage.py sample_data
-
That's it. Now you can run development server and open the site admin at http://localhost:8000/django-admin/ (initial creds: admin / 123123)
python manage.py runserver