# Path: recruit_app/app.py
# def create_app(config_object=ProdConfig):
#     '''An application factory, as explained here:
#         http://flask.pocoo.org/docs/patterns/appfactories/
# 
#     :param config_object: The configuration object to use.
#     '''
#     app = Flask(__name__)
#     app.config.from_object(config_object)
#     register_extensions(app)
#     register_blueprints(app)
#     register_errorhandlers(app)
#     admin = Admin()
#     register_admin(admin, db)
#     # register_search(app)
#     admin.init_app(app)
#     # admin needs to be initialized oddly for tests to work.
#     register_tasks()
# 
#     return app
# 
# Path: recruit_app/user/models.py
# class User(SurrogatePK, Model, UserMixin):
#     __tablename__ = 'users'
# 
#     email = Column(db.String(80), unique=True, nullable=False)
#     #: The hashed password
#     password = Column(db.String(128), nullable=True)
#     created_at = Column(db.DateTime, nullable=False, default=dt.datetime.utcnow)
#     active = Column(db.Boolean(), default=False)
#     is_admin = Column(db.Boolean(), default=False)
# 
#     confirmed_at = Column(db.DateTime, nullable=True)
# 
#     last_login_at = Column(db.DateTime())
#     current_login_at = Column(db.DateTime())
#     last_login_ip = Column(db.String(100))
#     current_login_ip = Column(db.String(100))
#     login_count = Column(db.Integer)
# 
#     roles = db.relationship('Role', secondary=roles_users, backref=db.backref('users', lazy='dynamic'), lazy='dynamic')
# 
#     main_character_id = ReferenceCol('characters', pk_name='character_id', nullable=True)
#     main_character = relationship('EveCharacter', backref='user_main_character', foreign_keys=[main_character_id])
# 
#     def set_password(self, password):
#         self.password = encrypt_password(password)
#         self.save()
# 
#     def check_password(self, value):
#         return verify_and_update_password(value, self)
# 
#     @classmethod
#     def create(self, **kwargs):
#         """Create a new record and save it the database."""
#         instance = self(**kwargs)
#         if kwargs['password']:
#             instance.password = encrypt_password(kwargs['password'])
#         return instance.save()
# 
#     @property
#     def get_ips(self):
#         return self.last_login_ip.split(', ') + self.current_login_ip.split(', ')
# 
#     def __repr__(self):
#         return '<User({name})>'.format(name=self.email)
# 
#     def __str__(self):
#         return self.email
# 
# class Role(SurrogatePK, Model, RoleMixin):
#     __tablename__ = 'roles'
#     name = Column(db.String(80), unique=True)
#     description = db.Column(db.String(255))
# 
#     def __repr__(self):
#         return '<Role({name})>'.format(name=self.name)
# 
# Path: recruit_app/settings.py
# class DevConfig(Config):
#     """Development configuration."""
#     ENV = 'dev'
#     DEBUG = True
#     #DB_NAME = 'dev.db'
#     # Put the db file in project root
#     #DB_PATH = os.path.join(Config.PROJECT_ROOT, DB_NAME)
#     SQLALCHEMY_DATABASE_URI = os_env.get('DATABASE_URL', 'postgresql://recruit@localhost:5432/recruit')
#     #SQLALCHEMY_DATABASE_URI = 'sqlite:///{0}'.format(DB_PATH)
#     WHOOSH_BASE = os.path.join(basedir, 'search.db')
#     #DEBUG_TB_ENABLED = True
#     ASSETS_DEBUG = True  # Don't bundle/minify static assets
#     CACHE_TYPE = 'simple'  # Can be "memcached", "redis", etc.
# 
# class ProdConfig(Config):
#     """Production configuration."""
#     ENV = 'prod'
#     DEBUG = False
#     SQLALCHEMY_DATABASE_URI = os_env.get('DATABASE_URL', 'postgresql://recruit@localhost:5432/recruit')
#     DEBUG_TB_ENABLED = False  # Disable Debug toolbar
#     WHOOSH_BASE = os.path.join(basedir, 'search.db')
# 
# Path: recruit_app/database.py
# class CRUDMixin(object):
# class Model(CRUDMixin, db.Model):
# class SurrogatePK(object):
# class TimeMixin(object):
#     def create(cls, **kwargs):
#     def update(self, commit=True, **kwargs):
#     def save(self, commit=True):
#     def delete(self, commit=True):
#     def get_by_id(cls, id):
# def ReferenceCol(tablename, nullable=True, pk_name='id', **kwargs):


import os
import sys
import subprocess
    import pytest
from flask_script import Manager, Shell, Server
from flask_migrate import MigrateCommand
from recruit_app.app import create_app
from recruit_app.user.models import User, Role
from recruit_app.settings import DevConfig, ProdConfig
from recruit_app.database import db
#!/usr/bin/env python
# -*- coding: utf-8 -*-

# from recruit_app.wsgi import app

if os.environ.get("RECRUIT_APP_ENV") == 'prod':
    app = create_app(ProdConfig)
else:

# Path: recruit_app/app.py
# def create_app(config_object=ProdConfig):
#     '''An application factory, as explained here:
#         http://flask.pocoo.org/docs/patterns/appfactories/
# 
#     :param config_object: The configuration object to use.
#     '''
#     app = Flask(__name__)
#     app.config.from_object(config_object)
#     register_extensions(app)
#     register_blueprints(app)
#     register_errorhandlers(app)
#     admin = Admin()
#     register_admin(admin, db)
#     # register_search(app)
#     admin.init_app(app)
#     # admin needs to be initialized oddly for tests to work.
#     register_tasks()
# 
#     return app
# 
# Path: recruit_app/user/models.py
# class User(SurrogatePK, Model, UserMixin):
#     __tablename__ = 'users'
# 
#     email = Column(db.String(80), unique=True, nullable=False)
#     #: The hashed password
#     password = Column(db.String(128), nullable=True)
#     created_at = Column(db.DateTime, nullable=False, default=dt.datetime.utcnow)
#     active = Column(db.Boolean(), default=False)
#     is_admin = Column(db.Boolean(), default=False)
# 
#     confirmed_at = Column(db.DateTime, nullable=True)
# 
#     last_login_at = Column(db.DateTime())
#     current_login_at = Column(db.DateTime())
#     last_login_ip = Column(db.String(100))
#     current_login_ip = Column(db.String(100))
#     login_count = Column(db.Integer)
# 
#     roles = db.relationship('Role', secondary=roles_users, backref=db.backref('users', lazy='dynamic'), lazy='dynamic')
# 
#     main_character_id = ReferenceCol('characters', pk_name='character_id', nullable=True)
#     main_character = relationship('EveCharacter', backref='user_main_character', foreign_keys=[main_character_id])
# 
#     def set_password(self, password):
#         self.password = encrypt_password(password)
#         self.save()
# 
#     def check_password(self, value):
#         return verify_and_update_password(value, self)
# 
#     @classmethod
#     def create(self, **kwargs):
#         """Create a new record and save it the database."""
#         instance = self(**kwargs)
#         if kwargs['password']:
#             instance.password = encrypt_password(kwargs['password'])
#         return instance.save()
# 
#     @property
#     def get_ips(self):
#         return self.last_login_ip.split(', ') + self.current_login_ip.split(', ')
# 
#     def __repr__(self):
#         return '<User({name})>'.format(name=self.email)
# 
#     def __str__(self):
#         return self.email
# 
# class Role(SurrogatePK, Model, RoleMixin):
#     __tablename__ = 'roles'
#     name = Column(db.String(80), unique=True)
#     description = db.Column(db.String(255))
# 
#     def __repr__(self):
#         return '<Role({name})>'.format(name=self.name)
# 
# Path: recruit_app/settings.py
# class DevConfig(Config):
#     """Development configuration."""
#     ENV = 'dev'
#     DEBUG = True
#     #DB_NAME = 'dev.db'
#     # Put the db file in project root
#     #DB_PATH = os.path.join(Config.PROJECT_ROOT, DB_NAME)
#     SQLALCHEMY_DATABASE_URI = os_env.get('DATABASE_URL', 'postgresql://recruit@localhost:5432/recruit')
#     #SQLALCHEMY_DATABASE_URI = 'sqlite:///{0}'.format(DB_PATH)
#     WHOOSH_BASE = os.path.join(basedir, 'search.db')
#     #DEBUG_TB_ENABLED = True
#     ASSETS_DEBUG = True  # Don't bundle/minify static assets
#     CACHE_TYPE = 'simple'  # Can be "memcached", "redis", etc.
# 
# class ProdConfig(Config):
#     """Production configuration."""
#     ENV = 'prod'
#     DEBUG = False
#     SQLALCHEMY_DATABASE_URI = os_env.get('DATABASE_URL', 'postgresql://recruit@localhost:5432/recruit')
#     DEBUG_TB_ENABLED = False  # Disable Debug toolbar
#     WHOOSH_BASE = os.path.join(basedir, 'search.db')
# 
# Path: recruit_app/database.py
# class CRUDMixin(object):
# class Model(CRUDMixin, db.Model):
# class SurrogatePK(object):
# class TimeMixin(object):
#     def create(cls, **kwargs):
#     def update(self, commit=True, **kwargs):
#     def save(self, commit=True):
#     def delete(self, commit=True):
#     def get_by_id(cls, id):
# def ReferenceCol(tablename, nullable=True, pk_name='id', **kwargs):


# Path: manage.py
import os
import sys
import subprocess
    import pytest
from flask_script import Manager, Shell, Server
from flask_migrate import MigrateCommand
from recruit_app.app import create_app
from recruit_app.user.models import User, Role
from recruit_app.settings import DevConfig, ProdConfig
from recruit_app.database import db

#!/usr/bin/env python
# -*- coding: utf-8 -*-

# from recruit_app.wsgi import app

if os.environ.get("RECRUIT_APP_ENV") == 'prod':
    app = create_app(ProdConfig)
else:

    app = create_app(DevConfig)