Utilizando o Django com Webpack
Utilize nosso boilerplate para iniciar o seu projeto usando Django + Webpack de maneira muito rápido e fácil, Ah… ainda consegue rodar pelo Docker.
Clone o repositório aqui, e depois veja como usar:
Minimal Django with Webpack and Bootstrap setup!
It should be pretty self explanatory, let me know if you need any help!
IMPORTANT: Docker setup is not yet ready for production!
Docker usage
- Rename
.env.example
>.env
and update it - Run
docker-compose build
- Run
docker-compose up -d
- [optional] Run
docker-compose exec boilerplate_app python manage.py createsuperuser
- Profit…
Suggestion: Rename the boilerplate_
image names in docker to your own app/project (also in DB scheme on .env).
Debugging Django App (in VSCode)
Django App can be debugged attaching VSCode to the PTVSD server (launch.json is included in this boilerplate), so:
- Add your breakpoints (or not)
- Go to ‘Run and Debug’ on the left panel
- Select ‘Docker: Django’
- Start it (F5)
Basic usage (legacy, but still works - kindof)
Front-end
1. Run yarn install
2. Run yarn serve
3. Profit…
Back-end
1. Create virtualenv && activate
2. Run pip install -r requirements.txt
3. Rename .env.example
> .env
and update it
4. [optional] Make manage.py
“runabble”: $ chmod +x manage.py
5. Run ./manage.py migrate
6. [optional] Run ./manager.py createsuperuser
7. Run ./manage.py runserver
8. Profit…