Skip to content
This repository was archived by the owner on Apr 14, 2022. It is now read-only.
This repository was archived by the owner on Apr 14, 2022. It is now read-only.

Support Django object models #129

Closed
Closed

Description

Microsoft/vscode-python#2271

Activity

  1. karthiknadig commented on Oct 22, 2018

    @karthiknadig
    Member

    From feedback:

    Please see screenshots below from PyCharm and VS Code respectively.
    image
    image
    As you can see the list of hints in PyCharm is more accurate.
    This is also the case below when accessing a django model's fields. PyCharm is able to detect that the value will actually be a string whereas VS Code only knows it as a CharField.
    image
    image

  2. SHxKM commented on May 11, 2019

    @SHxKM

    This would be lovely. Also , recognizing import errors specific to Django:

    from django.db.models import Q  # notice F isn't imported
    #...
    cls.get_artists_with_subs().order_by(F("last_refreshed")

    VSCode doesn't see any problem with this (until we get an error when this code is run).

    Pycharm, on the other hand, complains immediately:

    Screen Shot 2019-05-11 at 23 17 25

  3. jakebailey commented on May 11, 2019

    @jakebailey
    Member

    F not being warned seems like a bug; we'd appreciate it if you could make a new issue so we can fix it.

  4. elahmo commented on May 1, 2020

    @elahmo

    Has there been any work regarding this?

    Go to definition is a hit and miss with Python/Django, in most cases I have to search for class xxx( or def property( in order to find the definition.

  5. planetzalex commented on May 1, 2020

    @planetzalex

    Same here. This has been a problem with the language server for years.

  6. jakebailey commented on May 1, 2020

    @jakebailey
    Member

    There's a pretty tremendous amount of work in this item; Django models are all metaclass based where everything is generated at runtime, requiring us to essentially reimplement Django again in the analysis as special cases. There are stubs which provide richer info, but require a much better understanding of typing in general (which don't have complete).

    Either way, if we aren't actively updating an issue, then there aren't any updates.

  7. HarshilPatel007 commented on May 5, 2020

    @HarshilPatel007

    the new jedi 0.17.1 release now supports Django Meta Classes and added Django Stubs.
    If possible upgrade it to the newer version and harness the power of it into vscode-python.

  8. MikhailArkhipov commented on May 5, 2020

    @MikhailArkhipov

    LS does not use Jedi, so this issue is for the Python extension.

  9. HarshilPatel007 commented on May 5, 2020

    @HarshilPatel007

    LS does not use Jedi, so this issue is for the Python extension.

    Ohh, I though my query is mentioned here so I think it is related.
    But, please consider the Django Framework Support.

  10. wiredmatt commented on Aug 14, 2021

    @wiredmatt

    No updates on this? It's really frustrating having to check the documentation for every single property or method I want to use, I just want to press ctrl + space and get to know the things I can use and don't depend on myself to type it correctly...

  11. jakebailey commented on Aug 16, 2021

    @jakebailey
    Member

    This repo is no longer actively maintained or published. Consider using Pylance or Jedi, and filing issues for missing functionality appropriately. Pylance in particular ships stubs for Django which may help.

  12. judej commented on Apr 13, 2022

    @judej

    Thank you for the report. This project is no longer active. If you are using the Python language server in VSCode, the language server you are using is Pylance and please the http://github.com/microsoft/pylance-release to report issues.

    If you are using Visual Studio, then, please use http://github.com/microsoft/PTVS to report issues.

    devblogs.microsoft.com/python/python-in-visual-studio-code-september-2021-release/#microsoft-python-language-server-end-of-life-november-2021

    thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions