This repository will be used in the PyconAr2017 to take the step by step for "Django + React + Redux" workshop.
Heroku with app (auto deployment): web
This repository have the step by step for generate a productive project with these technologies. Each step is a branch with the project files for that step. The branches (steps):
- Step 1: create Django project
- Step 2: create Django app
- Step 3: add non-React views
- Step 4: add Django models
- Step 5: add django_webpack_loader
- Step 6: create first React component
- Step 7: use the bundle
- Step 8: hot reloading
- Step 9: Python linter
- Step 10: React linter
- Step 11: Python testing
- Step 12: react testing
- Step 13: Django context in React
- Step 14: api rest
- Step 15: websockets and channels
- Step 16: add redux
- Step 17: going to production
Each branch has the documentation in Spanish (README-es.md
) and in English ( README.md
).
My recommendation for the course is you install requirements before start. I want use docker (as you can see in each step) but also exists option without docker.
This image have code, pip requirements (dev, docs and production requirements), node dependencies (pruduction and dev dependencies), ...
docker pull registry.gitlab.com/fedeg/django-react-workshop:latest
# Clone
git clone https://gitlab.com/FedeG/django-react-workshop.git
cd django-react-workshop
# Python and Django
docker run -d -it --name workshop -v $PWD:/src -p 8000:8000 --workdir /src python:3.6 bash
docker exec -it workshop pip install -r requirements.txt
docker exec -it workshop pip install -r requirements-dev.txt
# Node and React
docker run -d -it --name workshopjs -v $PWD:/src -p 3000:3000 --workdir /src/workshop/front node:8 bash
docker exec -it workshopjs npm install yarn --global
docker exec -it workshopjs yarn install
# Clone
git clone https://gitlab.com/FedeG/django-react-workshop.git
cd django-react-workshop
# Python and Django
## Install python 3 (3.5 or 3.6)
pip install -r requirements.txt
pip install -r requirements-dev.txt
# Node and React
curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
sudo apt-get install -y build-essential nodejs
npm install yarn --global
cd workshop/front
yarn install