moved configuration of multi user mode to 0.py
This commit is contained in:
1 parent
7c258a001a
commit
04d960840a
3 files changed
+9
-10
No files matched your search
@@ -1 +1 @@
|
|||||||
Version 1.99.7 (2012-03-27 13:43:03) dev
|
Version 1.99.7 (2012-03-27 13:56:36) dev
|
||||||
@@ -56,7 +56,10 @@ import os
|
|||||||
GAE_APPCFG = os.path.abspath(os.path.join('/usr/local/bin/appcfg.py'))
|
GAE_APPCFG = os.path.abspath(os.path.join('/usr/local/bin/appcfg.py'))
|
||||||
|
|
||||||
# To use web2py as a teaching tool, set MULTI_USER_MODE to True
|
# To use web2py as a teaching tool, set MULTI_USER_MODE to True
|
||||||
MULTI_USER_MODE = True
|
MULTI_USER_MODE = False
|
||||||
|
EMAIL_SERVER = 'localhost'
|
||||||
|
EMAIL_SENDER = 'professor@example.com'
|
||||||
|
EMAIL_LOGIN = None
|
||||||
|
|
||||||
# configurable twitterbox, set to None/False to suppress
|
# configurable twitterbox, set to None/False to suppress
|
||||||
TWITTER_HASH = "web2py"
|
TWITTER_HASH = "web2py"
|
||||||
|
|||||||
@@ -4,24 +4,20 @@
|
|||||||
if MULTI_USER_MODE:
|
if MULTI_USER_MODE:
|
||||||
db = DAL('sqlite://storage.sqlite') # if not, use SQLite or other DB
|
db = DAL('sqlite://storage.sqlite') # if not, use SQLite or other DB
|
||||||
from gluon.tools import *
|
from gluon.tools import *
|
||||||
mail = Mail() # mailer
|
|
||||||
auth = Auth(globals(),db) # authentication/authorization
|
auth = Auth(globals(),db) # authentication/authorization
|
||||||
crud = Crud(globals(),db) # for CRUD helpers using auth
|
crud = Crud(globals(),db) # for CRUD helpers using auth
|
||||||
service = Service(globals()) # for json, xml, jsonrpc, xmlrpc, amfrpc
|
service = Service(globals()) # for json, xml, jsonrpc, xmlrpc, amfrpc
|
||||||
plugins = PluginManager()
|
plugins = PluginManager()
|
||||||
|
|
||||||
mail.settings.server = 'logging' or 'smtp.gmail.com:587' # your SMTP server
|
mail = auth.settings.mailer
|
||||||
mail.settings.sender = 'you@gmail.com' # your email
|
mail.settings.server = EMAIL_SERVER
|
||||||
mail.settings.login = 'username:password' # your credentials or None
|
mail.settings.sender = EMAIL_SENDER
|
||||||
|
mail.settings.login = EMAIL_LOGIN
|
||||||
|
|
||||||
auth.settings.hmac_key = '<your secret key>' # before define_tables()
|
|
||||||
auth.define_tables() # creates all needed tables
|
auth.define_tables() # creates all needed tables
|
||||||
auth.settings.mailer = mail # for user email verification
|
|
||||||
auth.settings.registration_requires_verification = False
|
auth.settings.registration_requires_verification = False
|
||||||
auth.settings.registration_requires_approval = True
|
auth.settings.registration_requires_approval = True
|
||||||
auth.messages.verify_email = 'Click on the link http://'+request.env.http_host+URL('default','user',args=['verify_email'])+'/%(key)s to verify your email'
|
|
||||||
auth.settings.reset_password_requires_verification = True
|
auth.settings.reset_password_requires_verification = True
|
||||||
auth.messages.reset_password = 'Click on the link http://'+request.env.http_host+URL('default','user',args=['reset_password'])+'/%(key)s to reset your password'
|
|
||||||
|
|
||||||
db.define_table('app',Field('name'),Field('owner',db.auth_user))
|
db.define_table('app',Field('name'),Field('owner',db.auth_user))
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user