Skip to content

Tailwind CSS Intellisense does not work on Django project + django-tailwind #1312

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
IgorArnaut opened this issue Apr 12, 2025 · 1 comment

Comments

@IgorArnaut
Copy link

IgorArnaut commented Apr 12, 2025

What version of VS Code are you using?
v1.99.2

What version of Tailwind CSS IntelliSense are you using?
v0.14.15

What version of Tailwind CSS are you using?
v4.1.0

What package manager are you using?
npm

What operating system are you using?
Windows 11 64-bit

Tailwind config

export const content = [
    // Templates within theme app (e.g. base.html)
    "../templates/**/*.html",
    // Templates in other apps
    "../../**/templates/*.html",
    // Ignore files in node_modules
    "!../../**/node_modules",
];

VS Code settings

{
    "[django-html]": {
        "editor.defaultFormatter": "junstyle.vscode-django-support"
    },
    "tailwindCSS.includeLanguages": {
        "plaintext": "django-html",
        "django-html": "html",
    }
}

Describe your issue
I've installed django-tailwind to my existing Django project following instructions from https://django-tailwind.readthedocs.io/en/latest/installation.html. I've also installed junstyle's Django Template Support and your Tailwind CSS Intellisense extensions to VS Code.

Folder structure:

└── 📁Django Real Estate Listings Web
    └── 📁.vscode
        └── settings.json
    └── 📁listings
        └── __init__.py
        └── admin.py
        └── apps.py
        └── 📁fixtures
            └── items.json
        └── forms.py
        └── 📁migrations
            └── __init__.py
            └── 0001_initial.py
            └── 0002_alter_listing_updated_at.py
        └── models.py
        └── services.py
        └── 📁templates
            └── base.html
            └── create.html
            └── detail.html
            └── index.html
            └── 📁partials
                └── __apartment.html
                └── __building.html
                └── __form.html
                └── __search.html
                └── __terms.html
            └── search.html
            └── update.html
        └── tests.py
        └── urls.py
        └── views.py
    └── 📁realestate
        └── __init__.py
        └── asgi.py
        └── settings.py
        └── urls.py
        └── wsgi.py
    └── 📁theme
        └── __init__.py
        └── apps.py
        └── 📁static
        └── 📁static_src
            └── .gitignore
            └── package-lock.json
            └── package.json
            └── postcss.config.js
            └── 📁src
                └── styles.css
            └── tailwind.config.js
            └── 📁css
    └── db.sqlite3
    └── manage.py

listings/templates/base.html:

{% load static tailwind_tags %}
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title class="">
      {% block title %}

      {% endblock %}
    </title>
    {% tailwind_css %}
  </head>
  <body>
    {% block content %}

    {% endblock %}
  </body>
</html>

Tailwind CSS Intellisense doesn't work in Django project. No suggested classes appear when typing in class attributes.

@IgorArnaut
Copy link
Author

Anyone???

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant