Beispiel #1
0
def free_email_providers_list():
    form = FreeEmailProviderForm()
    if form.validate_on_submit():
        item = FreeEmailProvider()
        form.populate_obj(item)
        item.save()
        form = FreeEmailProviderForm(None)

    domains = (FreeEmailProvider.query
               .order_by(FreeEmailProvider.domain.asc()))
    pagination = domains.paginate(per_page=90)
    return locals()
Beispiel #2
0
def free_email_provider_remove(pk):
    fep = FreeEmailProvider.get_or_404(pk)
    fep.delete()
    flash('Email provider has been removed', 'success')
    return redirect(url_for('accounts.free_email_providers_list'))