-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest_data.py
More file actions
29 lines (25 loc) · 799 Bytes
/
Copy pathtest_data.py
File metadata and controls
29 lines (25 loc) · 799 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
import datetime
from main.models import *
for round in ('East End', 'West End', 'Ochtrelure'):
Round.objects.get_or_create(name=round)
for customer in ("Craig's ma", "My ma"):
Customer.objects.get_or_create(
name=customer,
defaults={
'number_name_of_house': 2,
'address1': 'Dalrymple Terrace',
'postcode': 'DG9 8DH',
'phone': '01776 706854',
'email': 'bob@example.com'}
)
for round, customer in zip(Round.objects.all(),
Customer.objects.all()):
JobSchedule.objects.get_or_create(
round=round,
customer=customer,
defaults={
'cost': 10,
'start_date': datetime.date.today(),
'frequency': 4,
}
)