Django REST API Project Setup and Installation steps
Updated: Nov 22, 2022
Django REST API Project Setup and Installation steps
Download and Install GitBash.
Go to gitbash and run to check
git - -version
3. Run on gitbash
git config - -global user.email “sample@gmail.com”
Note:Write your own email.
4. Git config - - global user.name “xyz”
Note:Write your own username.
Download and install virtualbox from virtualbox.org → go to windows host and click to download
Download and install vagrant go to → developer.hashicorp.com/vagrant/downloads/
Download and Install Atom search for this in google
Download and install ModHeader for chrome extension and add it to chrome as a extension.
Create account on GitHub.
Setting Project
Create windows folder DRF
Create project folder accounts-rest-api inside DRF folder
Setting GIT Project
Open project folder accounts-rest-api in atom editor
Create file README.md in it from Atom editor only
Create file gitignore in project folder and copy the contents from here
{ This file makes sure not to add unwanted files in ur git }
Create file LICENSE in ur project folder and copy the license from here
Now close the atom and re open it
Now run the following commands from gitbash
git add .
This will add all the newly files u have created , repeat this step every time when u created or add new files in ur project
git commit -am “Initial commit”
It describes the changes u have made where a means all and m means message for future reference.
Pushing the code to github
To link ur project to ur github account generate ssh key as we have learn in linux. Run the following command on gitbash
ssh-keygen -t rsa -b 4096 -C “sample@gmail.com”
Write ur own. Install the keys in ur windows home folder only do not change the path, remember the path it may look like /c/User/sample/
Create Git Account on github.com with same email id and login
ls /c/Users/Lenovo/.ssh/id_pub.rsa
cat /c/Users/Lenovo/.ssh/id_pub.rsa
Go to github.com → login → settings → SSH and GPG key tab and add ur sshkey there to access passwordless communication
Create New Repository in github
git add --all
git commit -m "Initial comment"
git remote add origin git@github.com:boffinsadmin/accounts-rest-api.git
git branch -M main
git push -u origin main