mirror of
https://github.com/davidhalter/django-stubs.git
synced 2025-12-15 16:27:09 +08:00
13 lines
314 B
Plaintext
13 lines
314 B
Plaintext
[case testBasicModelFields]
|
|
from django.db import models
|
|
|
|
|
|
class User(models.Model):
|
|
id = models.AutoField(primary_key=True)
|
|
name = models.CharField(max_length=255)
|
|
|
|
user = User()
|
|
reveal_type(user.id) # E: Revealed type is 'builtins.int'
|
|
reveal_type(user.name) # E: Revealed type is 'builtins.str'
|
|
[out]
|