예제 #1
0
def view():
    reference_code = post_get('reference_code')
    entry = check_submission(reference_code)
    if entry:
        return skeleton(bottle.template('edit_form', var=entry))
    else:
        return check_code(var="Sorry, your code seems invalid!")
예제 #2
0
파일: routes.py 프로젝트: cmry/ebacs
def view():
    reference_code = post_get('reference_code')
    entry = check_submission(reference_code)
    if entry:
        return skeleton(bottle.template('edit_form', var=entry))
    else:
        return check_code(var="Sorry, your code seems invalid!")
예제 #3
0
파일: routes.py 프로젝트: cmry/ebacs
def index():
    return skeleton(bottle.template('welcome'))

    """Only authenticated users can see this"""
    # session = bottle.request.environ.get('beaker.session')
    # aaa.require(fail_redirect='/login')
    return 'Hi! <a href="/admin">Admin page</a> <a href="/logout">Logout</a>'
예제 #4
0
def submit():
    reference_code = hash(
        post_get('title') + str(post_get('authors')) + settings['salt'])
    subm = Submission({
        'reference_code': reference_code,
        'title': post_get('title'),
        'authors': post_get('authors'),
        'affiliations': post_get('affils'),
        'contact': post_get('contact'),
        'text': post_get('text'),
        'references': post_get('ref'),
        'figurl': post_get('figurl'),
        'table': post_get('table'),
        'caption': post_get('caption')
    })
    db.save(subm)
    tex.parse(subm)
    return skeleton(bottle.template('submit_message', var=reference_code))
예제 #5
0
파일: routes.py 프로젝트: cmry/ebacs
def submit():
    reference_code = hash(post_get('title') +
                          str(post_get('authors')) +
                          settings['salt'])
    subm = Submission({
        'reference_code': reference_code,
        'title': post_get('title'),
        'authors': post_get('authors'),
        'affiliations': post_get('affils'),
        'contact': post_get('contact'),
        'text': post_get('text'),
        'references': post_get('ref'),
        'figurl': post_get('figurl'),
        'table': post_get('table'),
        'caption': post_get('caption')
    })
    db.save(subm)
    tex.parse(subm)
    return skeleton(bottle.template('submit_message', var=reference_code))
예제 #6
0
def check_code(var=None):
    return skeleton(bottle.template('code_form', var=var))
예제 #7
0
def show_submit():
    return skeleton(bottle.template('submit_form'))
예제 #8
0
def index():
    return skeleton(bottle.template('welcome'))
    """Only authenticated users can see this"""
    # session = bottle.request.environ.get('beaker.session')
    # aaa.require(fail_redirect='/login')
    return 'Hi! <a href="/admin">Admin page</a> <a href="/logout">Logout</a>'
예제 #9
0
파일: corks.py 프로젝트: cmry/ebacs
def login_form():
    """Serve login form"""
    return skeleton(bottle.template('login_form'))
예제 #10
0
파일: routes.py 프로젝트: cmry/ebacs
def check_code(var=None):
    return skeleton(bottle.template('code_form', var=var))
예제 #11
0
파일: routes.py 프로젝트: cmry/ebacs
def show_submit():
    return skeleton(bottle.template('submit_form'))
예제 #12
0
def login_form():
    """Serve login form"""
    return skeleton(bottle.template('login_form'))