From 174e54681d8688a2c048ce3d199dea07ae99354d Mon Sep 17 00:00:00 2001 From: Tom Hacohen Date: Tue, 29 Dec 2020 16:06:59 +0200 Subject: [PATCH] Improve type annotations. --- django_etebase/models.py | 1 + myauth/models.py | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/django_etebase/models.py b/django_etebase/models.py index 096371d..3060fa4 100644 --- a/django_etebase/models.py +++ b/django_etebase/models.py @@ -124,6 +124,7 @@ def generate_stoken_uid(): class Stoken(models.Model): + id: int uid = models.CharField( db_index=True, unique=True, diff --git a/myauth/models.py b/myauth/models.py index 7786bf0..c9298a4 100644 --- a/myauth/models.py +++ b/myauth/models.py @@ -20,9 +20,10 @@ class UserManager(DjangoUserManager): class User(AbstractUser): + id: int username_validator = UnicodeUsernameValidator() - objects = UserManager() + objects: UserManager = UserManager() username = models.CharField( _("username"),