on ajuste les scripts pour remplir de manière plus 'crédible'
This commit is contained in:
parent
604c3591d7
commit
dc70973ca1
@ -6,15 +6,15 @@ def run():
|
||||
# divers
|
||||
|
||||
categories = [
|
||||
("Théâtre", "Au théâtre", "THÉ"),
|
||||
("Concert", "Concerts", "CCR"),
|
||||
("Danse", "En danse", "DSE"),
|
||||
("Arts du spectacle", None, "SPE"),
|
||||
("Jeune public", "Pour le jeune public", "JEP"),
|
||||
("Exposition", "Expositions", "EXP"),
|
||||
("Conférence", "Conférences", "CNF"),
|
||||
("Nature", "Événements nature", "NTR"),
|
||||
("Autre", "Autres événements", "ATR")
|
||||
("Théâtre", "Au théâtre", "T"),
|
||||
("Concert", "Concerts", "C"),
|
||||
("Danse", "Danse", "D"),
|
||||
("Arts du spectacle", None, "S"),
|
||||
("Jeune public", "Pour le jeune public", "J"),
|
||||
("Exposition", "Expositions", "E"),
|
||||
("Conférence", "Conférences", "C"),
|
||||
("Nature", "Événements nature", "N"),
|
||||
("Autre", "Autres événements", "A")
|
||||
]
|
||||
|
||||
if len(Category.objects.all()) == 0:
|
||||
|
@ -34,10 +34,11 @@ 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()
|
||||
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)
|
||||
|
Loading…
Reference in New Issue
Block a user