Beispiel #1
0
def send_activation_mail(user_id, activation_url):
    user = User.query.get(user_id)
    website_title = ctx.cfg['website_title']
    send_email(_(u'Registration at %s') % website_title, render_template('mails/registration', {
        'user':             user,
        'activation_url':   activation_url,
        'website_title':    website_title,
    }), ctx.cfg['mail_address'], user.email)
Beispiel #2
0
def send_activation_mail(user_id, activation_url):
    user = User.query.get(user_id)
    website_title = ctx.cfg['website_title']
    send_email(
        _(u'Registration at %s') % website_title,
        render_template(
            'mails/registration', {
                'user': user,
                'activation_url': activation_url,
                'website_title': website_title,
            }), ctx.cfg['mail_address'], user.email)
Beispiel #3
0
def debug_dump(obj):
    """Dumps the data into a HTML page for debugging."""
    from inyoka.core.templating import render_template
    dump = json.dumps(obj, ensure_ascii=False, indent=2)
    escaped = _escaped_newline_re.sub(u'\n', dump)
    return render_template('_debug_dump.html', dict(dump=escaped))
Beispiel #4
0
def debug_dump(obj):
    """Dumps the data into a HTML page for debugging."""
    from inyoka.core.templating import render_template
    dump = json.dumps(obj, ensure_ascii=False, indent=2)
    escaped = _escaped_newline_re.sub(u'\n', dump)
    return render_template('_debug_dump.html', dict(dump=escaped))