-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp.py
More file actions
31 lines (29 loc) · 647 Bytes
/
app.py
File metadata and controls
31 lines (29 loc) · 647 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
30
31
from models.post import Post
from database import Database
from menu import Menu
from models.blog import Blog
Database.initialize()
#
# post = Post(blog_id="000",
# title="Festival",
# content="Some event had been organige",
# author='Annn)
#
# post.save_to_mongo()
post=Post.from_mongo('99e2aba86def4873a0325c5f27f7b61d')
print(post)
#
# blog = Blog(author="jose",
# title="Simple title",
# description="sample description")
#
# blog.new_post()
#
# blog.save_to_mongo()
#
# from_database = Blog.from_mongo(blog.id)
#
# print(blog.get_posts())
#
# menu = Menu()
# menu.run_menu()