Changeset View
Changeset View
Standalone View
Standalone View
swh/deposit/models.py
Show First 20 Lines • Show All 116 Lines • ▼ Show 20 Lines | class Deposit(models.Model): | ||||
swh_anchor_id_context = models.TextField(blank=True, null=True) | swh_anchor_id_context = models.TextField(blank=True, null=True) | ||||
# Deposit's status regarding loading | # Deposit's status regarding loading | ||||
status = models.TextField( | status = models.TextField( | ||||
choices=DEPOSIT_STATUS, | choices=DEPOSIT_STATUS, | ||||
default=DEPOSIT_STATUS_PARTIAL) | default=DEPOSIT_STATUS_PARTIAL) | ||||
status_detail = JSONField(null=True) | status_detail = JSONField(null=True) | ||||
# deposit can have one parent | # deposit can have one parent | ||||
parent = models.ForeignKey('self', null=True) | parent = models.ForeignKey('self', null=True) | ||||
check_task_id = models.TextField(blank=True, null=True) | |||||
load_task_id = models.TextField(blank=True, null=True) | |||||
douardda: I'm gonna make my annoying nitpicker, but there should be something in there (comment or… | |||||
ardumontAuthorUnsubmitted Done Inline ActionsThat ain't nitpicking ;) ardumont: That ain't nitpicking ;) | |||||
ardumontAuthorUnsubmitted Done Inline ActionsTIL: https://docs.djangoproject.com/en/2.2/topics/db/models/#verbose-field-names There is a verbose_name parameter for that ;) ardumont: TIL: https://docs.djangoproject.com/en/2.2/topics/db/models/#verbose-field-names
There is a… | |||||
class Meta: | class Meta: | ||||
db_table = 'deposit' | db_table = 'deposit' | ||||
def __str__(self): | def __str__(self): | ||||
d = { | d = { | ||||
'id': self.id, | 'id': self.id, | ||||
'reception_date': self.reception_date, | 'reception_date': self.reception_date, | ||||
▲ Show 20 Lines • Show All 80 Lines • Show Last 20 Lines |
I'm gonna make my annoying nitpicker, but there should be something in there (comment or description string) giving a clue on what these fields are for.