Last Updated:

How to create django app and upload to github

Tejas Sawant
Tejas Sawant django

This article is 1st part of Building REST API with Python & Django series. So lets get started. Prerequisite is python and git must be installed on your system.

First we will create/set workspace for our project. we are going to start with creating folder/directory where you want to save project files.

Creating Workspace

Inside student-info-api we are going to store all of our project files. Then we are going to initialize our git repository for our project so after making each changes we can store that on our remote repository. type git init it will initialize our repository.

Git Init

Now we are going to open our project in any code editor in this series i am going top use Visual Studio Code. So i can simply type code . to open VS code in current directory.

Opening project

Now we going to add, .gitignore and LICENSE.




Then we create virtual environment in our folder/directory. run command python/python3 -m venv envafter that we active virtual environment by env\Scripts\activate.bat.

Virtual Environment

After that we are going to create file requirements.txt in that file specify our requirements. In this case django and djangorestframework


After that we will install this packages by typing command pip install -r requirements.txt

installing packages

For creating django app and installing dependencies i have already wrote an article. You click here.

At last step we are going to create project on github and uploading files there.

Creating Project

Now commit changes and push to github. follow following commands :-

git add . git commit -m "message for commit" git remote add origin your-git-url git push origin master

Committing Changes