-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathrecreate.py
More file actions
29 lines (24 loc) · 935 Bytes
/
recreate.py
File metadata and controls
29 lines (24 loc) · 935 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 app import db, app
from models import Favorite
db.app = app
db.init_app(app)
favorite1 = Favorite(user_id=1,
title='Favorite 1',
link='http://localhost.com',
date_taken=datetime.datetime.now(),
published=datetime.datetime.now(),
author='Jeff Kwiat',
author_id='123012399291',
tags='bob dylan neil young etc')
favorite2 = Favorite(user_id=2,
title='Favorite 2',
link='http://localhost.com:5000',
date_taken=datetime.datetime.now(),
published=datetime.datetime.now(),
author='Jeff Kwiat',
author_id='12301239asdffasdfa9291',
tags='june july august november')
db.session.add(favorite1)
db.session.add(favorite2)
db.session.commit()