diff --git a/data_preparation.ipynb b/data_preparation.ipynb index 75f8fc7..383a1a0 100644 --- a/data_preparation.ipynb +++ b/data_preparation.ipynb @@ -387,28 +387,7 @@ } ], "source": [ - "gutenberg_db = PostgresqlDatabase('gutenberg', user='postgres', password='112358',\n", - " host='47.96.146.55', port=5432)\n", - "\n", - "class BaseModel(Model):\n", - " \"\"\"A base model that will use our Postgresql database\"\"\"\n", - " class Meta:\n", - " database = gutenberg_db\n", - "\n", - "class Book(BaseModel):\n", - " author = CharField()\n", - " title = TextField()\n", - " \n", - " class Meta:\n", - " database = gutenberg_db\n", - "\n", - "\n", - "gutenberg_db.connect()\n", - "Book.create_table()\n", - "book = Book(author=\"me\", title='Peewee is cool')\n", - "book.save()\n", - "for book in Book.filter(author=\"me\"):\n", - " print(book.title)" + ] }, {