Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Maybe more things to note in docs #92

Closed
johnmave126 opened this issue Aug 15, 2013 · 0 comments
Closed

Maybe more things to note in docs #92

johnmave126 opened this issue Aug 15, 2013 · 0 comments

Comments

@johnmave126
Copy link

I think maybe in docs, more database related options can be added.
Current Docs only note the following

DATABASE = {
    'name': 'example.db',
    'engine': 'peewee.SqliteDatabase',
}

Only after reading the source did I realize that I can pass more options to it.
For example, for someone who is using MySQL(need authentication)

DATABASE = {
    'name': 'test',
    'engine': 'peewee.MySQLDatabase',
    'user': 'username',
    'passwd': 'password',
}

For a multi-thread application, especially for a MySQL application, I found it important to set thread_locals to True.
So this is ok

DATABASE = {
    'name': 'test',
    'engine': 'peewee.MySQLDatabase',
    'user': 'username',
    'passwd': 'password',
    'threadlocals': True,
}

Or there is high probability to face coleifer/peewee#222 (comment)
I suggest add some tips in docs to clarify these information...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant