# Path: webphamerator/app/celery_ext/celery_app.py
# def make_celery(app_name=__name__):
# 
# Path: webphamerator/app/auth.py
# AUTHENTICATION_NOT_NEEDED = ['/signin', '/db', '/static']
# def require_authentication():
# def is_authenticated():
# def is_password_required():
# def set_password(password):
# def delete_password():
# def sign_out():
# def authenticate(password):
# def is_password_valid(password):
# def digest(password, salt):
# def template_context():
# def show_sign_out_button():
# 
# Path: webphamerator/app/sqlalchemy_ext/models.py
# class Database(db.Model):
# class Job(db.Model):
# class JobOrganismToDelete(db.Model):
# class GenbankFile(db.Model):
# class Password(db.Model):
#     def url(self):
#     def mysql_name_for(cls, name):
#     def phamerator_name_for(cls, name):
#     def mysql_name(self):
#     def __repr__(self):
#     def __repr__(self):
#     def __repr__(self):
#     def __repr__(self):


from flask import (
        render_template, abort, request, url_for, redirect,
        send_from_directory, make_response, session, current_app, Blueprint)
from webphamerator.app.celery_ext.celery_app import celery
from webphamerator.app import auth
from webphamerator.app.sqlalchemy_ext import (db, models)
from pdm_utils import AlchemyHandler
import pham.db
import os
import io
    if len(errors):
        del session['errors']

    return render_template('settings.html',
                           title='Settings',
                           successes=successes,
                           errors=errors,
                           navbar=get_navbar('/settings'),
                           password_required=auth.is_password_required())


@bp.route('/settings', methods=['POST'])
def update_settings():
    errors = []
    successes = []

    # set password
    password = request.form.get('password')
    if password is not None:
        password = password.strip()
        if password == '':
            password = None
            errors.append('Password must not be blank.')

    if password is not None:
        auth.set_password(password)
        successes.append('Password updated.')

    # delete password
    if request.form.get('delete-password') == 'true':

# Path: webphamerator/app/celery_ext/celery_app.py
# def make_celery(app_name=__name__):
# 
# Path: webphamerator/app/auth.py
# AUTHENTICATION_NOT_NEEDED = ['/signin', '/db', '/static']
# def require_authentication():
# def is_authenticated():
# def is_password_required():
# def set_password(password):
# def delete_password():
# def sign_out():
# def authenticate(password):
# def is_password_valid(password):
# def digest(password, salt):
# def template_context():
# def show_sign_out_button():
# 
# Path: webphamerator/app/sqlalchemy_ext/models.py
# class Database(db.Model):
# class Job(db.Model):
# class JobOrganismToDelete(db.Model):
# class GenbankFile(db.Model):
# class Password(db.Model):
#     def url(self):
#     def mysql_name_for(cls, name):
#     def phamerator_name_for(cls, name):
#     def mysql_name(self):
#     def __repr__(self):
#     def __repr__(self):
#     def __repr__(self):
#     def __repr__(self):


# Path: webphamerator/app/views.py
from flask import (
        render_template, abort, request, url_for, redirect,
        send_from_directory, make_response, session, current_app, Blueprint)
from webphamerator.app.celery_ext.celery_app import celery
from webphamerator.app import auth
from webphamerator.app.sqlalchemy_ext import (db, models)
from pdm_utils import AlchemyHandler
import pham.db
import os
import io

    if len(errors):
        del session['errors']

    return render_template('settings.html',
                           title='Settings',
                           successes=successes,
                           errors=errors,
                           navbar=get_navbar('/settings'),
                           password_required=auth.is_password_required())


@bp.route('/settings', methods=['POST'])
def update_settings():
    errors = []
    successes = []

    # set password
    password = request.form.get('password')
    if password is not None:
        password = password.strip()
        if password == '':
            password = None
            errors.append('Password must not be blank.')

    if password is not None:
        auth.set_password(password)
        successes.append('Password updated.')

    # delete password
    if request.form.get('delete-password') == 'true':

        auth.delete_password()