on ajuste les scripts pour remplir de manière plus 'crédible'
This commit is contained in:
@@ -34,11 +34,12 @@ def run():
|
||||
'tags': [tags[random.randint(0, len(tags) - 1)] for i in range(0, random.randint(0, 10))]
|
||||
|
||||
}
|
||||
if random.randint(0, 1) == 1:
|
||||
fields["end_day"] = (sday + timedelta(days=random.randint(0, 6))).date()
|
||||
if random.randint(0, 1) == 1:
|
||||
fields["start_time"] = random_hour()
|
||||
if random.randint(0, 1) == 1:
|
||||
fields["end_time"] = random_hour()
|
||||
else:
|
||||
if random.randint(0, 5) == 1:
|
||||
fields["end_day"] = (sday + timedelta(days=random.randint(0, 6))).date()
|
||||
if random.randint(0, 1) == 1:
|
||||
fields["end_time"] = random_hour()
|
||||
faker.create(fields)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user