PyCharm autocomplete stops working in Django project


Sorry but I ran out of ideas. I'm struggling with strange issue with code autocomplete. It stops working after IDE restart.

When I start Django project from scratch (File --> New Project --> Django) and I create new app, setup all views, templates etc, everything works fine. For example, in my file i have:

def index(request):
content = {'some_dict': 'value'}
return render(request, 'test/index.html', content)

Then I go to template index.html file, put Jinja2 tags {{ }} and start type 's', PyCharm suggests autocomplete 'some_dict', which is correct, right?

Ok. But when I restart IDE, re-open project and try to do same thing, PyCharm can't suggest what to put in those tags. Actually It suggests anything.

Did someone experienced something like this before? I'd be very grateful for your help!


My PyCharm Pro version is 2020.03, running on MacOS BigSur(11.0.1).


Comment actions Permalink

Ok, I found a solution.

Apparently after re-opening IDE, PyCharm didn't apply file under Settings --> Languages & Frameworks --> Django. I edited "Settings" attribute as below:

And voila! PyCharm is autocompleting my tags again!

Comment actions Permalink



I am very sorry you have faced the bug , please feel free to vote. 

Comment actions Permalink

Things don't work on my side, even after reselecting "" settings and clicking "invalidate cache / restart" menu.

And both python and html autocomplete don't work.

PyCharm Pro: 2020.3; OS: macOS 11.1; Intel.

I don't know exactly what I did before this happens, maybe a "create-react-app frontend" in the Django app root folder?

Comment actions Permalink

Sam Tang

Please update to the latest version (2020.3.2 at the moment) and try again.
If the problem remains, report it to and we'll investigate.

Comment actions Permalink

I have the same problem...

But I don't have single file, i have settings module instead...

What is the solution for this?


Please sign in to leave a comment.