# Path: farmsList/settings.py
# 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"
# 
# 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"


import os
import json
import time
from copy import deepcopy
from sqlalchemy import create_engine
from farmsList.settings import ProdConfig, DevConfig
					else:
						data[dataType] = parcel[dataType]
					del neededFillData[dataType]
			# use defaults for inserts where data not explicitly added
			if not isUpdate:
				for dataType, dataValue in neededFillData.iteritems():
					data[dataType] = dataValue
			sqlStatementInner = "({}, '{}', '{}', {}, '{}', '{}', '{}', '{}', {}), ".format(
				int(parcel['id']), 
				parcel['jurisdiction'], 
				data['geometry'], 
				data['water'], 
				data['zoning'], 
				data['soil'], 
				data['address'], 
				"",
				data['geom']
			)
			if isUpdate:
				updateNeeded = True
				sqlUpdateStatementInner += sqlStatementInner
			else:
				insertNeeded = True
				sqlInsertStatement += sqlStatementInner
		sqlInsertStatement = sqlInsertStatement[:-2]
		sqlUpdateStatementInner = sqlUpdateStatementInner[:-2]
		sqlUpdateStatement = (
			"UPDATE parcels AS p SET "
				"geometry = v.geometry, "
				"water = v.water, "

# Path: farmsList/settings.py
# 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"
# 
# 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"


# Path: farmsList/modules/importers.py
import os
import json
import time
from copy import deepcopy
from sqlalchemy import create_engine
from farmsList.settings import ProdConfig, DevConfig

					else:
						data[dataType] = parcel[dataType]
					del neededFillData[dataType]
			# use defaults for inserts where data not explicitly added
			if not isUpdate:
				for dataType, dataValue in neededFillData.iteritems():
					data[dataType] = dataValue
			sqlStatementInner = "({}, '{}', '{}', {}, '{}', '{}', '{}', '{}', {}), ".format(
				int(parcel['id']), 
				parcel['jurisdiction'], 
				data['geometry'], 
				data['water'], 
				data['zoning'], 
				data['soil'], 
				data['address'], 
				"",
				data['geom']
			)
			if isUpdate:
				updateNeeded = True
				sqlUpdateStatementInner += sqlStatementInner
			else:
				insertNeeded = True
				sqlInsertStatement += sqlStatementInner
		sqlInsertStatement = sqlInsertStatement[:-2]
		sqlUpdateStatementInner = sqlUpdateStatementInner[:-2]
		sqlUpdateStatement = (
			"UPDATE parcels AS p SET "
				"geometry = v.geometry, "
				"water = v.water, "

				"zoning = v.zoning, "