mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-16 02:27:06 +08:00
Make sure that infering the Django User model works
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
"""
|
||||
Module is used to infer Django model fields.
|
||||
Bugs:
|
||||
- Can't infer User model.
|
||||
- Can't infer ManyToManyField.
|
||||
"""
|
||||
from jedi import debug
|
||||
|
||||
@@ -2,6 +2,11 @@ import datetime
|
||||
import decimal
|
||||
|
||||
from django.db import models
|
||||
from django.contrib.auth.models import User
|
||||
|
||||
|
||||
#? str()
|
||||
User().email
|
||||
|
||||
|
||||
class Tag(models.Model):
|
||||
@@ -38,6 +43,9 @@ class BusinessModel(models.Model):
|
||||
|
||||
unidentifiable = NOT_FOUND
|
||||
|
||||
# -----------------
|
||||
# Model attribute inference
|
||||
# -----------------
|
||||
|
||||
model_instance = BusinessModel()
|
||||
#? int()
|
||||
|
||||
Reference in New Issue
Block a user