Add Patch and Delete

This commit is contained in:
Andros Fenollosa
2018-02-06 21:29:09 +01:00
parent 40a9963eee
commit 32209620e1
3 changed files with 68 additions and 16 deletions

View File

@ -25,10 +25,10 @@ print('Users created')
# Make 1000 fake news
for num in range(1000):
title = fake.sentence()
link = fake.uri()
url = fake.uri()
user_id = randint(1, 100)
# Save in database
my_notice = Notice(title=title, link=link, user_id=user_id)
my_notice = Notice(title=title, url=url, user_id=user_id)
db.session.add(my_notice)
print('News created')