Skip to content
This repository has been archived by the owner on May 14, 2024. It is now read-only.

reamde update #324

Open
wants to merge 1 commit into
base: 0.9
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,13 @@ Configuration
All you need to get you started is the configuration describing your database connections
and passing it to a ``DatabaseManager`` instance.

In order to run migrations, this config should be created in a separate file and be the passed with `-c` to `orator migrate`.

.. code-block:: python

from orator import DatabaseManager, Model

config = {
databases = {
'mysql': {
'driver': 'mysql',
'host': 'localhost',
Expand All @@ -58,7 +60,7 @@ and passing it to a ``DatabaseManager`` instance.
}
}

db = DatabaseManager(config)
db = DatabaseManager(databases)
Model.set_connection_resolver(db)


Expand Down Expand Up @@ -775,7 +777,7 @@ Here is an example of how read / write connections should be configured:

.. code-block:: python

config = {
databases = {
'mysql': {
'read': {
'host': '192.168.1.1'
Expand Down