My Brain Cells

Easiest (and best) learning materials for anyone with a curiosity for machine learning and artificial intelligence, Deep learning, Programming, and other fun life hacks.



What is Django?

  Django is a high-level Python Web framework that encourages rapid development and clean, pragmatic design. Built by experienced developers, it takes care of much of the hassle of Web development, so you can focus on writing your app without needing to reinvent the wheel. It’s free and open source. Here

First Things First:

1. Install python in computer. link

2. Set the path of python in environment variable.

3. now install vs code. link

4. Open the terminal in vs code.

5. Now create a virtual environment by command- “python -m venv env”

6. Open command pallet in vs code and search for python env, activate it.

7. Now your environmet is ready for the django project.

8. Now in terminal install django by command “python -m pip install django”

9. To check use pip freeze to show all the packages that are present or installed.

10. Start project by command “django-admin startproject projectname

11. Go to project directory.

12. To run the project or to run server use command “python manage .py runserver”

MVT(Model View Template) of Django :


1. Check for the migration,by “python  makemirations”

2. To create the migrations “python migrate”

3. Now start the app in the project by “python startapp appname”

4. Now in a the appname folder add file manually

5. In main add app in the app list.

6. Now we should include that to the main file 

7. So go to the main and add “path(”,include(‘appname.urls’))

8. Add include after the “path”(in import line)

9.Now add templates in the , go to the templates section and under dirs=[]

   Add dirs=[os.path.join(BASE_DIR,’templates’],

10. Now add static files so go down in the same file


    STATIC_URL = ‘/static/’






Django Documentation: Here

Free ebook for Complete Django: Here



Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top