django-rest boilerplate for 4Geeks Academy students (ready for deployment on heroku if needed)
- Production-ready configuration for Static Files, Database Settings, Gunicorn, etc.
- Enhancements to Django's static file serving functionality via WhiteNoise.
- Latest Python 3.6 runtime environment.
To use this project, follow these steps:
- Make sure you have python 3.6 installed, if you are using Cloud 9 you can install it by typing:
$ pyenv install 3.6.6 (this step takes a while)
$ pyenv global 3.6.6
- Install Django and pipenv (
$ sudo pip install django pipenv
) - Make sure your current folder is empty.
$ ls
(if you dols
, it should show nothing, no files) - Create a new project using the 4Geeks Academy django-rest-hello template:
$ django-admin startproject <your_project_name> . --template=https://github.com/4GeeksAcademy/django-rest-hello/archive/master.zip --name=Procfile
You can replace <your_project_name>
with your desired project name.
5. Install any defaul packages (similar to npm install
when using javascript) and get inside your recently created python envirnoment
$ pypenv install
$ pipenv shell
- Run the migrations
$ python manage.py migrate
- Start the python server
$ python manage.py runserver $IP:$PORT
Your python API should be running smoothly.
$ git init
$ git add -A
$ git commit -m "Initial commit"
$ heroku create
$ git push heroku master
$ heroku run python manage.py migrate
- Working with django /admin to create superusers, add models to your admin, etc.
- Using the 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.
- Working with OAuth implementing OAuth with the JWT Oauth Toolkit.