forked from devmanorg/22_proto_markup
/
create_site.py
83 lines (72 loc) · 2.71 KB
/
create_site.py
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
import staticjinja as sj
USER = 'Иван Федорович Крузенштерн'
index_content = {
'user': USER,
'reviews': 4,
'author': 'Иван Федорович Крузенштерн, г. Улан-Удэ',
'review_text': 'Лучшего товара я просто не видел! Потрясающе!!'
'Буду брать тут всегда! Абсолютно все! Perfect!!',
'requests': 4,
'time': 'вчера, в 12:50',
'request_info': '60шт. ПК от 72-15 до ПК 21-15,'
'Криводановка, с доставкой.',
'request_person_name': 'Алексей',
'views_value': '12 просмотров',
'footer': True
}
org_catalog_content = {
'user': USER,
'tables': 4,
'company_name': 'ООО Строй-Сервис-Монтаж',
'company_location': 'Новосибирск',
'company_production': 'ЖБИ, бетон',
'company_address': 'Под часами, на том же месте',
'company_phone_number': '00-00-00',
'footer': True
}
organisation_content = {
'user': USER,
'specification': 'ЖБИ',
'company_name': 'ООО Строй-Сервис-Монтаж',
'company_location': 'Новосибирск',
'company_production': 'ЖБИ, бетон',
'company_address': 'Под часами, на том же месте',
'company_phone_number': '00-00-00',
'specialties': ['Плиты', 'Перекрытия', 'Доставляем быстро'],
'footer': True
}
requests_content = {
'user': USER,
'requests': 6,
'time': 'вчера, в 12:50',
'request_info': '60шт. ПК от 72-15 до ПК 21-15,'
'Криводановка, с доставкой.',
'request_person_name': 'Алексей',
'views_value': '12 просмотров',
'footer': True
}
specification_content = {
'user': USER,
'specification': 'ЖБИ',
'tables': 4,
'company_name': 'ООО Строй-Сервис-Монтаж',
'company_location': 'Новосибирск',
'company_production': 'ЖБИ, бетон',
'company_address': 'Под часами, на том же месте',
'company_phone_number': '00-00-00',
'footer': True
}
profile_content = {
'user': USER,
'footer': False
}
if __name__ == "__main__":
site = sj.make_site(outpath='static', contexts=[
('index.html', index_content),
('org_catalog.html', org_catalog_content),
('organisation.html', organisation_content),
('profile.html', profile_content),
('requests.html', requests_content),
('specification_catalog.html', specification_content)
])
site.render()