PeeWee PostgreSQL Database creation: does not exist
<p>I'm attempting to create a PostgreSQL database using <code>PeeWee</code>. Upon connecting I get the following error:  </p>

<blockquote>
  <p>File "peewee_test.py", line 44, in <br>
     psql_db.connect()<br>
   File "c:\python27\lib\site-packages\peewee.py", line 3602, in connect<br>
     self.initialize_connection(self._local.conn)<br>
   File "c:\python27\lib\site-packages\peewee.py", line 3514, in <strong>exit</strong><br>
     reraise(new_type, new_type(*exc_args), traceback)<br>
   File "c:\python27\lib\site-packages\peewee.py", line 3600, in connect<br>
     **self.connect_kwargs)<br>
   File "c:\python27\lib\site-packages\playhouse\postgres_ext.py", line 385, in _connect<br>
     conn = super(PostgresqlExtDatabase, self)._connect(database, **kwargs)<br>
   File "c:\python27\lib\site-packages\peewee.py", line 3990, in _connect<br>
     conn = psycopg2.connect(database=database, **kwargs)<br>
   File "c:\python27\lib\site-packages\psycopg2__init__.py", line 164, in connect<br>
     conn = _connect(dsn, connection_factory=connection_factory, async=async)<br>
  peewee.OperationalError: FATAL:  database "test" does not exist   </p>
</blockquote>

<p>Any idea what I am doing wrong?</p>

<pre><code>from peewee import *
from playhouse.postgres_ext import PostgresqlExtDatabase

psql_db = PostgresqlExtDatabase(
    'test',  # Required by Peewee.
    user='xxxxx',  # Will be passed directly to psycopg2.
    password='xxxxx',  # Ditto.
    host='',  # Ditto.
    port='5432'
)

psql_db.connect() # error occurs here

psql_db.create_tables([Person, Pet])
</code></pre>