forked from VimPlug/jedi
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.
|
Module is used to infer Django model fields.
|
||||||
Bugs:
|
Bugs:
|
||||||
- Can't infer User model.
|
|
||||||
- Can't infer ManyToManyField.
|
- Can't infer ManyToManyField.
|
||||||
"""
|
"""
|
||||||
from jedi import debug
|
from jedi import debug
|
||||||
|
|||||||
@@ -2,6 +2,11 @@ import datetime
|
|||||||
import decimal
|
import decimal
|
||||||
|
|
||||||
from django.db import models
|
from django.db import models
|
||||||
|
from django.contrib.auth.models import User
|
||||||
|
|
||||||
|
|
||||||
|
#? str()
|
||||||
|
User().email
|
||||||
|
|
||||||
|
|
||||||
class Tag(models.Model):
|
class Tag(models.Model):
|
||||||
@@ -38,6 +43,9 @@ class BusinessModel(models.Model):
|
|||||||
|
|
||||||
unidentifiable = NOT_FOUND
|
unidentifiable = NOT_FOUND
|
||||||
|
|
||||||
|
# -----------------
|
||||||
|
# Model attribute inference
|
||||||
|
# -----------------
|
||||||
|
|
||||||
model_instance = BusinessModel()
|
model_instance = BusinessModel()
|
||||||
#? int()
|
#? int()
|
||||||
|
|||||||
Reference in New Issue
Block a user