The 2016.1.2 version of PyCharm doesn't seem to autocomplete queries on Django models anymore. For example on Foo.objects.filter(some-field-lookup)
the filter method doesn't get autocompleted (or any other method) and also the field-lookup parameters don't get autcompleted, which both worked in PyCharm version 5.
Is anybody else having this issue? Is this expected behavior? Is there some setting which needs to be turned on?
Restarting or invalidating the cache and restarting didn't have any effect on this
For me, the problem turned about to be that PyCharm wasn't aware that the site was using Django, since I didn't use PyCharm's creation tool to start the Django project. (I assume most people don't after the first few projects they try, which is why the autocompletion seems to work and then break)
Go under Settings/Languages & Frameworks/Django, and make sure that Django Support is turned on, and that the settings.py and manage.py files are correctly specified. This fixed the problem for me.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With