2017-11-13 23:35:00 +03:00
|
|
|
from django.db import models
|
|
|
|
|
|
|
|
|
|
|
|
class MyFakeModel(models.Model):
|
|
|
|
cool_name = models.CharField(max_length=50)
|
2017-11-15 01:10:26 +03:00
|
|
|
created = models.DateTimeField(auto_now_add=True)
|
2019-06-10 02:25:34 +03:00
|
|
|
|
|
|
|
|
|
|
|
class MyFakeModelWithPassword(models.Model):
|
|
|
|
cool_name = models.CharField(max_length=50)
|
|
|
|
password = models.CharField(max_length=50)
|
2020-02-21 20:42:47 +03:00
|
|
|
|
|
|
|
|
|
|
|
class MyFakeModelWithDate(models.Model):
|
|
|
|
cool_name = models.CharField(max_length=50)
|
|
|
|
last_edited = models.DateField()
|
2023-07-27 02:41:40 +03:00
|
|
|
|
|
|
|
|
|
|
|
class MyFakeModelWithChoiceField(models.Model):
|
|
|
|
class ChoiceType(models.Choices):
|
|
|
|
ASDF = "asdf"
|
|
|
|
HI = "hi"
|
|
|
|
|
|
|
|
choice_type = models.CharField(
|
|
|
|
max_length=4,
|
|
|
|
default=ChoiceType.HI.name,
|
|
|
|
)
|