-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp.py
More file actions
42 lines (37 loc) · 1.04 KB
/
app.py
File metadata and controls
42 lines (37 loc) · 1.04 KB
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
from app.src import app, db
from app.src.entity.music import Music
from app.src.entity.role import Role
from datetime import datetime
if __name__=='__main__':
"""
music = Music(
name='Soul Rebels',
performer='Боб Марли',
genre='Регги',
release_date=datetime(1970, 12, 5),
input_date=datetime.utcnow(),
cover='reg12334g1.jpeg'
)
music1 = Music(
name='Soul Revolution',
performer='Боб Марли',
genre='Регги',
release_date=datetime(1970, 12, 5),
input_date=datetime.utcnow(),
cover='beg2323ty34.jpeg'
)
music2 = Music(
name='The Best of the Wailers',
performer='Боб Марли',
genre='Регги',
release_date=datetime(1970, 12, 5),
input_date=datetime.utcnow(),
cover='fh421kge239gef2.jpeg'
)
db.session.add(music)
db.session.add(music1)
db.session.add(music2)
db.session.commit()
"""
Role.insert_roles()
app.run(debug = True)