Esempio n. 1
0
def initialize():
    init()
    create_tables()
    NetworkStore.initialize()
    ClientStore.initialize()
    ChannelStore.initialize()
    UserStore.initialize()
    MessageLogStore.initialize()
    ActivityLogStore.initialize()
Esempio n. 2
0
def initialize():
    init()
    create_tables()
    NetworkStore.initialize()
    ClientStore.initialize()
    ChannelStore.initialize()
    UserStore.initialize()
    MessageLogStore.initialize()
    ActivityLogStore.initialize()
Esempio n. 3
0
def initialize():
    create_tables()
    NetworkStore.initialize()
    ClientStore.initialize()
    ChannelStore.initialize()
    UserStore.initialize()
Esempio n. 4
0
def register():
    form = RegisterForm(request.form)
    if request.method == 'POST' and form.validate():
        username = request.form.get('username')
        email = request.form.get('email')
        password = request.form.get('password')

        user = User(username=username, email=email, password=password)
        db.add(user)
        db.commit()
        subprocess.check_output(
            [conf.LOUNGE_BINARY, 'add', user.username, password])

        if user and user.authenticate(password):
            login_user(user)
            return redirect(url_for('add_network'))


# somewhere to logout
@app.route("/logout")
@login_required
def logout():
    logout_user()
    return redirect(url_for('index'))


if __name__ == '__main__':
    from ircb.models import create_tables
    create_tables()
    app.run(debug=True)
Esempio n. 5
0
def initialize():
    create_tables()
    NetworkStore.initialize()
    ClientStore.initialize()
    ChannelStore.initialize()
    UserStore.initialize()
Esempio n. 6
0
from flask import Flask
from ircb.config import settings
from ircb.models import get_session, create_tables

app = Flask(__name__)

if __name__ == '__main__':
    create_tables()
    session = get_session(settings.DB_URI)
    app.run()