diff options
author | clarkzjw <[email protected]> | 2023-02-21 16:46:11 -0800 |
---|---|---|
committer | clarkzjw <[email protected]> | 2023-02-21 16:46:11 -0800 |
commit | 22fb6a357f1b6b91f04a180604e2f992280ee661 (patch) | |
tree | 0ed80d12ac41475138077891ffea0bb78fe392cb /bot/models.py | |
parent | 0ce8037dcb01745edc9930b09e72bf7ea4dfcf4e (diff) | |
download | swarm2fediverse-22fb6a357f1b6b91f04a180604e2f992280ee661.tar.gz |
add django app templatefeature/django
Diffstat (limited to 'bot/models.py')
-rw-r--r-- | bot/models.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/bot/models.py b/bot/models.py new file mode 100644 index 0000000..c6df3e7 --- /dev/null +++ b/bot/models.py | |||
@@ -0,0 +1,9 @@ | |||
1 | from django.contrib.auth.models import AbstractUser | ||
2 | from django.db import models | ||
3 | |||
4 | |||
5 | class User(AbstractUser): | ||
6 | name = models.CharField(max_length=50, blank=True) | ||
7 | telegram_id = models.PositiveBigIntegerField(unique=True, primary_key=True) | ||
8 | username = models.CharField(max_length=32, blank=False) | ||
9 | USERNAME_FIELD = 'telegram_id' | ||