# Path: farmsList/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)
#     return app
# 
# Path: farmsList/user/models.py
# class User(UserMixin, SurrogatePK, Model):
#     __tablename__ = 'users'
#     username = Column(db.String(80), unique=True, nullable=False)
#     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)
#     first_name = Column(db.String(30), nullable=True)
#     last_name = Column(db.String(30), nullable=True)
#     active = Column(db.Boolean(), default=False)
#     is_admin = Column(db.Boolean(), default=False)
# 
#     def __init__(self, username, email, password=None, **kwargs):
#         db.Model.__init__(self, username=username, email=email, **kwargs)
#         if password:
#             self.set_password(password)
#         else:
#             self.password = None
# 
#     def set_password(self, password):
#         self.password = bcrypt.generate_password_hash(password)
# 
#     def check_password(self, value):
#         return bcrypt.check_password_hash(self.password, value)
# 
#     @property
#     def full_name(self):
#         return "{0} {1}".format(self.first_name, self.last_name)
# 
#     def __repr__(self):
#         return '<User({username!r})>'.format(username=self.username)
# 
# Path: farmsList/public/models.py
# class Parcel(SurrogatePK, Model):
#     __tablename__ = 'parcels'
#     size = Column(db.Numeric(precision=6, scale=2), nullable = False)
#     water = Column(db.Numeric(precision=3, scale=0), nullable=True)
#     soil = Column(db.String(400), nullable=True)
#     zoning = Column(db.String(80), nullable=False)
#     geometry = Column(db.String(6250000), nullable=False)
#     center = Column(db.String(2000), nullable=False)
#     geom = Column(Geometry(geometry_type='MULTIPOLYGON'))
#     cent = Column(Geometry(geometry_type='POINT'))
#     developmentPlan = Column(db.String(400), nullable=True)
#     restrictions = Column(db.String(400), nullable=True)
#     address = Column(db.String(400), nullable=True)
#     apn = Column(db.BigInteger(), nullable=False, unique=True)
#     jurisdiction = Column(db.String(400))
#     landType = Column(db.String(80), nullable=True)
#     landUse = Column(db.String(80), nullable=True)
# 
#     def __init__(self, **kwargs):
#         db.Model.__init__(self, **kwargs)
# 
#     def __repr__(self):
#         return '<Parcel({id})>'.format(id=self.id)
# 
# Path: farmsList/settings.py
# class DevConfig(Config):
#     """Development configuration."""
#     ENV = 'dev'
#     DEBUG = True
#     MAIL_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 = 'postgresql://urbanlandlocatoradmin:@localhost/urban_land_locator' #'sqlite:///{0}'.format(DB_PATH)
#     DEBUG_TB_ENABLED = True
#     ASSETS_DEBUG = True  # Don't bundle/minify static assets
#     HTTP_SERVER = "localhost:5001"
# 
# class ProdConfig(Config):
#     """Production configuration."""
#     ENV = 'prod'
#     DEBUG = False
#     SQLALCHEMY_DATABASE_URI = os_env.get('HEROKU_POSTGRESQL_IVORY_URL')
#     DEBUG_TB_ENABLED = False  # Disable Debug toolbar
#     HTTP_SERVER = "acres.herokuapp.com"
# 
# Path: farmsList/database.py
# class CRUDMixin(object):
# class Model(CRUDMixin, db.Model):
# class SurrogatePK(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=False, pk_name='id', **kwargs):


import os
import sys
import subprocess
    import pytest
from flask.ext.script import Manager, Shell, Server
from flask.ext.migrate import MigrateCommand
from farmsList.app import create_app
from farmsList.user.models import User
from farmsList.public.models import Parcel
from farmsList.settings import DevConfig, ProdConfig
from farmsList.database import db
#!/usr/bin/env python
# -*- coding: utf-8 -*-


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

# Path: farmsList/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)
#     return app
# 
# Path: farmsList/user/models.py
# class User(UserMixin, SurrogatePK, Model):
#     __tablename__ = 'users'
#     username = Column(db.String(80), unique=True, nullable=False)
#     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)
#     first_name = Column(db.String(30), nullable=True)
#     last_name = Column(db.String(30), nullable=True)
#     active = Column(db.Boolean(), default=False)
#     is_admin = Column(db.Boolean(), default=False)
# 
#     def __init__(self, username, email, password=None, **kwargs):
#         db.Model.__init__(self, username=username, email=email, **kwargs)
#         if password:
#             self.set_password(password)
#         else:
#             self.password = None
# 
#     def set_password(self, password):
#         self.password = bcrypt.generate_password_hash(password)
# 
#     def check_password(self, value):
#         return bcrypt.check_password_hash(self.password, value)
# 
#     @property
#     def full_name(self):
#         return "{0} {1}".format(self.first_name, self.last_name)
# 
#     def __repr__(self):
#         return '<User({username!r})>'.format(username=self.username)
# 
# Path: farmsList/public/models.py
# class Parcel(SurrogatePK, Model):
#     __tablename__ = 'parcels'
#     size = Column(db.Numeric(precision=6, scale=2), nullable = False)
#     water = Column(db.Numeric(precision=3, scale=0), nullable=True)
#     soil = Column(db.String(400), nullable=True)
#     zoning = Column(db.String(80), nullable=False)
#     geometry = Column(db.String(6250000), nullable=False)
#     center = Column(db.String(2000), nullable=False)
#     geom = Column(Geometry(geometry_type='MULTIPOLYGON'))
#     cent = Column(Geometry(geometry_type='POINT'))
#     developmentPlan = Column(db.String(400), nullable=True)
#     restrictions = Column(db.String(400), nullable=True)
#     address = Column(db.String(400), nullable=True)
#     apn = Column(db.BigInteger(), nullable=False, unique=True)
#     jurisdiction = Column(db.String(400))
#     landType = Column(db.String(80), nullable=True)
#     landUse = Column(db.String(80), nullable=True)
# 
#     def __init__(self, **kwargs):
#         db.Model.__init__(self, **kwargs)
# 
#     def __repr__(self):
#         return '<Parcel({id})>'.format(id=self.id)
# 
# Path: farmsList/settings.py
# class DevConfig(Config):
#     """Development configuration."""
#     ENV = 'dev'
#     DEBUG = True
#     MAIL_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 = 'postgresql://urbanlandlocatoradmin:@localhost/urban_land_locator' #'sqlite:///{0}'.format(DB_PATH)
#     DEBUG_TB_ENABLED = True
#     ASSETS_DEBUG = True  # Don't bundle/minify static assets
#     HTTP_SERVER = "localhost:5001"
# 
# class ProdConfig(Config):
#     """Production configuration."""
#     ENV = 'prod'
#     DEBUG = False
#     SQLALCHEMY_DATABASE_URI = os_env.get('HEROKU_POSTGRESQL_IVORY_URL')
#     DEBUG_TB_ENABLED = False  # Disable Debug toolbar
#     HTTP_SERVER = "acres.herokuapp.com"
# 
# Path: farmsList/database.py
# class CRUDMixin(object):
# class Model(CRUDMixin, db.Model):
# class SurrogatePK(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=False, pk_name='id', **kwargs):


# Path: manage.py
import os
import sys
import subprocess
    import pytest
from flask.ext.script import Manager, Shell, Server
from flask.ext.migrate import MigrateCommand
from farmsList.app import create_app
from farmsList.user.models import User
from farmsList.public.models import Parcel
from farmsList.settings import DevConfig, ProdConfig
from farmsList.database import db

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


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

    app = create_app(DevConfig)