example_conf and cork initialization

74 views
Skip to first unread message

Michael

unread,
Sep 7, 2012, 1:16:14 PM9/7/12
to cork-d...@googlegroups.com
I am wondering if the author might provide more detailed customization/configuration instructions for using this extension in readers bottle based applications.

Currently simple_webapp.py  initializes a Cork object with:

aaa = Cork('example_conf', email_sender='federico...@gmail.com', smtp_server='mail2.eircom.net')

Clearly one would want to change the email_sender and smtp_server parameters in this initialization. Are there any other configuration edits recommended by the author?

Michael

PS Here is the initialization in cork.py

class Cork(object):

    def __init__(self, directory, email_sender=None, smtp_server=None,
        users_fname='users', roles_fname='roles', pending_reg_fname='register',
        initialize=False, session_domain=None):
        """Auth/Authorization/Accounting class

        :param directory: configuration directory
        :type directory: str.
        :param users_fname: users filename (without .json), defaults to 'users'
        :type users_fname: str.
        :param roles_fname: roles filename (without .json), defaults to 'roles'
        :type roles_fname: str.
        """
        self.mailer = Mailer(email_sender, smtp_server)
        self._store = JsonBackend(directory, users_fname='users',
            roles_fname='roles', pending_reg_fname='register',
            initialize=initialize)
        self.password_reset_timeout = 3600 * 24
        self.session_domain = session_domain
Reply all
Reply to author
Forward
0 new messages