Common Mistake People do while doing Django!

Anmol SoniAnmol Soni
1 min read

Through this Blog, I want to aware you that while doing Django, then the most common mistake people do is that: They forget to create a Virtual environment in the directory, and without creating they used to start the project by writing 'python manage.py runserver that's why "no module found" error is generated.

Steps you should follow to prevent this mistake:

  1. Make Proper Folder Structuring in your File Manager.

  2. Open Vs code OR Any IDE and type in "django-admin" in the terminal.

  3. Type django-admin start-project (Project name)

  4. Type python manage.py startapp (App name)

  5. Create a Virtual environment by using the code mentioned below:

a) pip install virtualenv
b) python.exe -m pip install --upgrade pip)
c) python -m venv myenv
d) myenv\Scripts\activate
e) pip install django
f) cd (in ur project)

6. Then u can start now ur project by ur code(in views.py, urls.py, models.py, admin.py, settings.py, etc...)

By follow the above steps you can prevent yourself from errors.

Thank you!
Happy Coding.

0
Subscribe to my newsletter

Read articles from Anmol Soni directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Anmol Soni
Anmol Soni

Hi, I am Anmol! I am from Gwalior, Pursuing a BTech cs from ITM University Gwalior. I am an AI/ML enthusiast as well as I am a Full stack developer. Developed various projects and work with different people in a team. I am happy to join you all on the hash node, I will share my progress and project with you all time to time as well as I will also share my knowledge about technology with you all. Hope it will help you! Regards, Anmol Soni