Skip to content

Commit 0dc317f

Browse files
committed
backends: settings params for param style and users table
1 parent d577923 commit 0dc317f

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

README

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ PHPBB AUTHENTICATION IMPLEMENTED IN PYTHON
44
Author: Santtu Pajukanta <santtu@pajukanta.fi>
55
Updated: 2010-03-31
66

7+
78
Introduction
89
============
910

@@ -72,6 +73,8 @@ PHPBB_AUTH_DB_PARAMS = {
7273
"password": "",
7374
"database": "",
7475
}
76+
PHPBB_AUTH_DB_PARAM_STYLE = "%s"
77+
PHPBB_AUTH_DB_USERS_TABLE = "phpbb_users"
7578

7679
Obviously, there's some filling in to do. Notice how we left ModelBackend in,
7780
too. This way we can define superusers etc. in Django and just the peons in

phpbb/auth/backends.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def connect_to_database():
2929

3030
db_module = __import__(settings.PHPBB_AUTH_DB_MODULE, globals(), locals(), [], -1)
3131
conn = db_module.connect(**settings.PHPBB_AUTH_DB_PARAMS)
32-
setup(conn)
32+
setup(conn, param_style=settings.PHPBB_AUTH_DB_PARAM_STYLE, users_table=settings.PHPBB_AUTH_DB_USERS_TABLE)
3333

3434
class PhpbbBackend(object):
3535
def __init__(self):

0 commit comments

Comments
 (0)