A django-rest boilerplate for 4Geeks Academy students. It features ready-for-deployment on heroku instructions.
- Ready to deploy to heroku in just 1 minute (for free).
- 100% compatible with gitpod.
1) Install any default packages (similar to npm install
when using javascript) and get inside your recently created python envirnoment
$ pipenv install
$ pipenv run migrate
Run database migration$ pipenv run start
Run the server
Your python API should be running smoothly. You should read the docs for tutorials.
You can go ahead and add/update the following files:
- api/models.py to include more tables/entities into your database.
- api/urls.py to include more endpoints and match them with views
- views.py to specify wich methods will apply to each endpoint (GET, POST, PUT, DELETE)
- Working with django /admin to create superusers, add models to your admin, etc.
- Using the python shell to CRUD models, etc.
- Working with Migrations for everytime you change your model
- Using MySQL insalling and using MySQL in your application.
- Using Mongo insalling and using mongo in your application.
If you don't have your code connected to a github repository, please do it:
$ git init
$ git add -A
$ git commit -m "Initial commit"
Then, run these 3 steps to deploy to heroku:
$ heroku create
$ git push heroku master
$ heroku run python manage.py migrate
This template was built as part of the 4Geeks Academy Coding Bootcamp by Alejandro Sanchez and many other contributors. Find out more about our Full Stack Developer Course, and Data Science Bootcamp.