VS Code Extension Setup for Python Django Web Development

Here’s a comprehensive list of VS Code extensions that will enhance your Django development experience, along with explanations of why each one is useful:

Thank you for reading this post, don't forget to subscribe!

Essential Extensions

  1. Python Extension for Visual Studio Code (ms-python.python)
    • Provides IntelliSense, linting, debugging, code navigation, formatting, refactoring, and more for Python
    • Essential for Django development as it understands Python syntax and Django project structures
  2. Django (batisteo.vscode-django)
    • Adds Django template language support
    • Provides syntax highlighting for Django templates
    • Includes useful snippets for common Django patterns
  3. Django Snippets (bibhasdn.django-snippets)
    • Collection of useful Django snippets for models, views, forms, etc.
    • Speeds up development with ready-to-use code templates
  4. Django Template (bibhasdn.django-html)
    • Enhanced support for Django template files
    • Better syntax highlighting and IntelliSense for template tags

HTML/CSS/JavaScript Support

  1. Auto Close Tag (formulahendry.auto-close-tag)
    • Automatically adds closing tags in HTML files
    • Works with Django templates as well
  2. Auto Complete Tag (formulahendry.auto-complete-tag)
    • Provides completion for matching tags
    • Saves time when writing HTML in templates
  3. Auto Rename Tag (formulahendry.auto-rename-tag)
    • When you rename one HTML tag, automatically renames the paired tag
    • Very useful for template editing
  4. Highlight Matching Tag (vincaslt.highlight-matching-tag)
    • Visually highlights matching tags in HTML files
    • Helps navigate complex template structures

Productivity Boosters

  1. GitHub Copilot (GitHub.copilot)
    • AI pair programmer that suggests code as you type
    • Can help with both Python and template code
  2. IntelliCode (VisualStudioExptTeam.vscodeintellicode)
    • AI-assisted development with smarter IntelliSense
    • Learns from your codebase to provide better suggestions
  3. IntelliCode API Usage Examples (VisualStudioExptTeam.intellicode-api-usage-examples)
    • Shows how APIs are commonly used in open source projects
    • Helpful when learning new Django features

Code Quality

  1. Prettier – Code Formatter (esbenp.prettier-vscode)
    • Opinionated code formatter for consistent styling
    • Can be configured to work with Django template files
  2. Python Indent (KevinRose.vsc-python-indent)
    • Correctly handles Python indentation rules
    • Especially helpful for Django’s often-nested code structure

Visual Helpers

  1. vscode-icons (vscode-icons-team.vscode-icons)
    • Adds icons to your file explorer for better visual organization
    • Helps quickly identify Django files (models.py, views.py, etc.)
  2. Indent One Space (usernamehw.indent-one-space)
    • Allows fine-grained control over indentation
    • Useful when working with both Python (4 spaces) and templates (often 2 spaces)

Recommended Settings

Add these to your VS Code settings.json for optimal Django development:

or

Settings.json

Installation

You can install all these extensions at once by running this command in VS Code’s command palette (Ctrl+Shift+P):

This setup will give you a powerful Django development environment with all the tools you need for efficient coding, debugging, and template editing.

Here are all the extensions with their direct VS Code Marketplace links for easy installation:

Core Django & Python Extensions

  1. Python – Official Python support
  2. Django – Django template support
  3. Django Snippets – Common Django patterns
  4. Django Template – Enhanced template support

HTML/Template Helpers

  1. Auto Close Tag
  2. Auto Complete Tag
  3. Auto Rename Tag
  4. Highlight Matching Tag

AI & Productivity

  1. GitHub Copilot
  2. IntelliCode
  3. IntelliCode API Examples

Code Quality

  1. Prettier
  2. Python Indent

Visual Helpers

  1. vscode-icons
  2. Indent One Space

Bonus Django Helpers

  1. Django Template Formatter – Formats Django templates
  2. SQLTools – Database management

To install any extension:

  1. Click the link
  2. Click “Install” on the marketplace page
  3. It will automatically open in VS Code

For bulk installation, you can paste this in your terminal:

code –install-extension ms-python.python –install-extension batisteo.vscode-django –install-extension bibhasdn.django-snippets –install-extension bibhasdn.django-html –install-extension formulahendry.auto-close-tag –install-extension formulahendry.auto-complete-tag –install-extension formulahendry.auto-rename-tag –install-extension vincaslt.highlight-matching-tag –install-extension GitHub.copilot –install-extension VisualStudioExptTeam.vscodeintellicode –install-extension VisualStudioExptTeam.intellicode-api-usage-examples –install-extension esbenp.prettier-vscode –install-extension KevinRose.vsc-python-indent –install-extension vscode-icons-team.vscode-icons –install-extension usernamehw.indent-one-space

Share on:

Hello, I am Dharmendra Yadav and I am a Python Developer with experience in web development using Django, Flask, REST API, SQL, MySQL, HTML, CSS, JavaScript, WordPress, Oracle Cloud, AWS and Git. I also write technical articles where I explain web development and Software Engineering. Facebook , Linkedin