Recently I started to learn to React and the best part about React is when I want to set up a new project I have 'create-react-app' which make a smoother experience in creating a project.
It installs all the required dependencies, initialized git and added some extra file also.
But there is no such tool for Django or I don't know
Whenever I have to set up a new Project in Django, I have to do some repetitive task like :
- python -m venv env
- pip install django
- git init
- touch .gitignore
- code .
So I have created a PowerShell script that will create a Virtual Environment and install Django in a folder provided by you in the current directory.
After this It will also create a .gitignore file with "/env" and finally your project will open in VS Code
- Python Installed
- Git Installed
- Visual Studio Code Installed
First of all get the script.
Note : Currently, I have created only three variant of this and download the most suitable script for you.
You can modify it according to your preferences.
Like if you don't want to open Visual Studio Code after creating the project then just remove the "code ."
Similarly, if you want to run the server after creating the project then you can use third script
Let's say you want to install more module like django-rest-framework or Pillow then just add the code like this after pip install django.
... ... pip install django pip install djangorestframework pip install pillow ... ...
Put your script in the directory where you want to create a new folder and set up your Django Project.
Finally, Run the script by right-clicking on it and click on "Run with PowerShell"
Here is the screenshot of script in action :
If you not creating a lot of project like me then it will fine for you to set up Project on your own.
But I think for those who are learning Django and creating a lot of projects then this script will help them 😊
If you have any doubt regarding this or have any suggestions you can comment below.
Thanks for reading!