diff --git a/.DS_Store b/.DS_Store
new file mode 100644
index 0000000..7888345
Binary files /dev/null and b/.DS_Store differ
diff --git a/.env-example b/.env-example
new file mode 100644
index 0000000..9f7be21
--- /dev/null
+++ b/.env-example
@@ -0,0 +1,3 @@
+AI_DBS=test
+AI_USERNAME=test
+AI_PASSWORD=test
diff --git a/.gitignore b/.gitignore
index a424c55..4474249 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,9 +1,10 @@
*idea*
-
*.pyc
-
*.db
-
*.box
-
-.vagrant
\ No newline at end of file
+.vagrant
+venv
+*node_modules/
+*.DS_Store
+.env
+api/test/fixtures/
diff --git a/README.md b/README.md
index 45f302c..ac628f5 100644
--- a/README.md
+++ b/README.md
@@ -1,14 +1,20 @@
# SpongeBase
-Interactive data mash-up of Lebanon's locations and interventions
+Interactive data mash-up of Lebanon's locations and interventions
A joint project by UNHCR/UNICEF Innovation leads in Lebanon.
-##Project overview
+## Project overview
-Data on geographical locations (governorates, districts, cities, villages, camps, schools etc…) in a humanitarian response is often scattered in different locations, whether in databases, folders, assessment reports, and information sharing websites. A lot of effort is spent on collating available information for secondary data reviews as well as for profiling certain geographical location for operational importance.
-The idea of this project is to automatically collate available information from different data sources in a simple format and linking them to a geographical location like a governorate, district, village or even a small camp.
-SpongeBase is composed of a dynamic map interface (SpongeMap) and a web app/interface (DOG).
+Data on geographical locations (governorates, districts, cities, villages, camps, schools etc…) in a humanitarian response is often scattered in different locations, whether in databases, folders, assessment reports, and information sharing websites. A lot of effort is spent on collating available information for secondary data reviews as well as for profiling certain geographical location for operational importance.
+The idea of this project is to automatically collate available information from different data sources in a simple format and linking them to a geographical location like a governorate, district, village or even a small camp.
+SpongeBase is composed of a dynamic map interface (SpongeMap) and a web app/interface (DOG).
SpongeMap has only the Common and Fundamental Operational Data Sets (CoDs and FoDs) preloaded. The DOG is a web application and web API that links to existing information systems and remote folders (like Dropbox). Sponemap sends a request for information regarding a certain location and the DOG fetches all available information even from excel files in dropbox folders, packages it and sends it back to be displayed on the map.
-Not only will this project help collating information but it has the potential to revolutionize the way we look at Who What Where (3W) information. Partners would fill a simple template, store it in a dropbox and the information becomes available to other actors on a map and all in one simple readable format. Agencies wanting to work in a specific area would go to the map, zoom in to a location and retrieve key information whether population figures, key indicators, implemented projects, or major/minor events or issues that happened in that location. With all this knowledge base, agencies would then decide if this is an area that requires their intervention.
+Not only will this project help collating information but it has the potential to revolutionize the way we look at Who What Where (3W) information. Partners would fill a simple template, store it in a dropbox and the information becomes available to other actors on a map and all in one simple readable format. Agencies wanting to work in a specific area would go to the map, zoom in to a location and retrieve key information whether population figures, key indicators, implemented projects, or major/minor events or issues that happened in that location. With all this knowledge base, agencies would then decide if this is an area that requires their intervention.
+
+## Code
+
+### Get in to docker containers
+
+61d103150e85
diff --git a/api/Dockerfile b/api/Dockerfile
new file mode 100644
index 0000000..4632562
--- /dev/null
+++ b/api/Dockerfile
@@ -0,0 +1,18 @@
+FROM python:2.7-alpine
+ADD . /todo
+WORKDIR /todo
+RUN pip install -r requirements.txt
+
+## cron ##
+
+# Add crontab file in the cron directory
+## ADD crontab /etc/cron.d/hello-cron
+
+# Give execution rights on the cron job
+## RUN chmod 0644 /etc/cron.d/hello-cron
+
+# Create the log file to be able to run tail
+## RUN touch /var/log/cron.log
+
+# # Run the command on container startup
+# CMD cron && tail -f /var/log/cron.log
diff --git a/api/README.md b/api/README.md
new file mode 100644
index 0000000..e9f3e0d
--- /dev/null
+++ b/api/README.md
@@ -0,0 +1,7 @@
+If you don't want to run this in docker, run:
+
+`$ virtualenv venv`
+
+`$ venv`
+
+we want to go back to equitrip
diff --git a/api/app.py b/api/app.py
new file mode 100644
index 0000000..d80b734
--- /dev/null
+++ b/api/app.py
@@ -0,0 +1,132 @@
+import os
+
+from flask import Flask, redirect, url_for, request, render_template
+from flask_mongorest import methods
+from flask_mongorest.views import ResourceView
+from flask_mongorest.resources import Resource
+from pymongo import MongoClient
+from flask_mongorest import MongoRest
+from flask_mongorest import methods
+from flask_mongorest import operators as ops
+
+from spongemap import ReportResource
+
+from flask_mongoengine import MongoEngine
+
+# Create application
+app = Flask(__name__)
+
+app.config['DEBUG'] = True
+
+# Create dummy secrey key so we can use sessions
+app.config['SECRET_KEY'] = '123456790'
+app.config['MONGODB_SETTINGS'] = {
+ 'db': 'ai-aggregator',
+ 'host': ['DB_PORT_27017_TCP_ADDR'],
+ 'port': 27017
+}
+db = MongoEngine()
+api = MongoRest(app)
+
+@app.route('/')
+def index():
+ return render_template('spongemap.html')
+
+
+class Attribute(db.EmbeddedDocument):
+ name = db.StringField()
+ value = db.StringField()
+
+class NeNone(ops.Ne):
+ def apply(self, queryset, field, value, negate=False):
+ # convert nulls to python None
+ if value == u'null':
+ value = None
+ return super(NeNone, self).apply(queryset, field, value)
+
+
+class AttributeResource(Resource):
+ document = Attribute
+
+class Report(db.Document):
+ db_name = db.StringField()
+ date = db.StringField()
+ site_id = db.IntField()
+ p_code = db.StringField()
+ category = db.StringField()
+ activity_id = db.IntField()
+ activity = db.StringField()
+ partner_id = db.IntField()
+ partner_name = db.StringField()
+ location_id = db.IntField()
+ location_name = db.StringField()
+ location_type = db.StringField()
+ location_x = db.DecimalField()
+ location_y = db.DecimalField()
+ gov_code = db.StringField()
+ governorate = db.StringField()
+ district_code = db.StringField()
+ district = db.StringField()
+ cadastral_code = db.StringField()
+ cadastral = db.StringField()
+ indicator_id = db.IntField()
+ indicator_category = db.StringField()
+ indicator_name = db.StringField()
+ value = db.DecimalField()
+ units = db.StringField()
+ comments = db.StringField()
+ attributes = db.ListField(
+ db.EmbeddedDocumentField(Attribute)
+ )
+
+ meta = {
+ 'indexes': [
+ 'date',
+ 'db_name',
+ 'p_code',
+ 'category',
+ 'activity',
+ 'partner_name',
+ 'location_name',
+ 'indicator_category',
+ 'indicator_name',
+ 'gov_code',
+ 'governorate',
+ 'district_code',
+ 'district',
+ 'cadastral_code',
+ 'cadastral'
+ ]
+ }
+
+
+class ReportResource(Resource):
+ paginate = False
+ document = Report
+ related_resources = {
+ 'attributes': AttributeResource,
+ }
+ filters = {
+ 'p_code': [NeNone, ops.Exact, ops.Startswith],
+ 'partner_name': [ops.Exact, ops.IStartswith, ops.IContains],
+ 'db_name': [ops.Exact, ops.IStartswith, ops.IContains],
+ 'date': [ops.Exact, ops.IStartswith, ops.IContains],
+ 'category': [ops.Exact, ops.IStartswith, ops.IContains],
+ 'activity': [ops.Exact, ops.IStartswith, ops.IContains],
+ 'location_name': [ops.Exact, ops.IStartswith, ops.IContains],
+ 'indicator_name': [ops.Exact, ops.IStartswith, ops.IContains],
+ 'governorate': [ops.Exact, ops.IStartswith, ops.IContains],
+ 'district': [ops.Exact, ops.IStartswith, ops.IContains],
+ 'cadastral': [ops.Exact, ops.IStartswith, ops.IContains],
+ 'cadastral_code': [ops.Exact, ops.IStartswith, ops.IContains],
+ }
+
+
+@api.register(name='reports', url='/reports/')
+class ReportsView(ResourceView):
+ resource = ReportResource
+ methods = [methods.List]
+
+
+if __name__ == "__main__":
+ app.run(host='0.0.0.0', debug=True)
diff --git a/requirements.txt b/api/full-requirements.txt
similarity index 53%
rename from requirements.txt
rename to api/full-requirements.txt
index 2e5d24f..d2452cf 100644
--- a/requirements.txt
+++ b/api/full-requirements.txt
@@ -1,3 +1,4 @@
+## flask stuff ##
Flask
Flask-OAuthlib
Flask-Views
@@ -5,16 +6,20 @@ Flask-Script
Flask-MongoEngine
flask-login
flask-admin
-git+https://github.com/jamescw/flask-mongorest.git
-git+https://github.com/HCDX/ActvityInfoPython.git
-gunicorn
+
+## 3rd party data producers stuff ##
+activityinfo-python==1.6.0
cartodb
-pandas
-cleancat
-mimerender
+
+## stuff i woud like to remove ##
+git+https://github.com/jamescw/flask-mongorest.git
+
+## gunicorn
+## cleancat
+## mimerender
raven[flask]
requests
celery
redis
newrelic
-DateTime
\ No newline at end of file
+DateTime
diff --git a/manage.py b/api/manage.py
similarity index 54%
rename from manage.py
rename to api/manage.py
index 88140fb..759f659 100755
--- a/manage.py
+++ b/api/manage.py
@@ -9,28 +9,36 @@
import requests
import json
-from flask.ext.script import (
+from flask_script import (
Manager,
Server
)
+from requests.auth import HTTPBasicAuth
+
from pymongo import MongoClient
-from activtyinfo_client import ActivityInfoClient
+from activityinfo_client import ActivityInfoClient
from cartodb import CartoDBAPIKey, CartoDBException
from spongemap import app, Report, Attribute
manager = Manager(app)
-ai = MongoClient(
- os.environ.get('MONGODB_URL', 'mongodb://localhost:27017'))['ai-aggregator']
+
+# db = MongoClient(
+# os.environ.get('MONGODB_URL', 'mongodb://localhost:27017'))['ai-aggregator']
+
+## FIXME - what if the host is remote??
+mongo_client = MongoClient(os.environ['DB_PORT_27017_TCP_ADDR'], 27017)
+ai = mongo_client['ai-aggregator']
def send_message(message):
- requests.post(
- os.environ.get('SLACK_WEBHOOK'),
- data=json.dumps({'text': message})
- )
+ logging.info('[MESSAGE] :%s', message)
+ # requests.post(
+ # os.environ.get('SLACK_WEBHOOK'),
+ # data=json.dumps({'text': message})
+ # )
@manager.command
@@ -60,145 +68,65 @@ def update_levels(country_code='LB'):
site_type['name'].encode('UTF-8'), location['name'].encode('UTF-8')
)
-
-@manager.command
-def update_sites(
- api_key='',
- domain='',
- username='',
- password='',
- list_name='',
- site_type='',
- name_col='',
- code_col='',
- target_list=''
-):
- carto_client = CartoDBAPIKey(api_key, domain)
-
- ai_client = ActivityInfoClient(username, password)
-
- # create an index of sites by p_code
- existing = dict(
- (site['code'], dict(site, index=i))
- for (i, site) in enumerate(
- ai_client.get_locations(target_list)
- ) if 'code' in site
- )
-
- sites = carto_client.sql(
- 'select * from {}'.format(list_name)
- )
- send_message('Starting upload of {}'.format(list_name))
- bad_codes = []
- updated_sites = 0
- for row in sites['rows']:
- p_code = str(row[code_col]).strip()
- site_name = row[name_col].encode('UTF-8')
- cad = ai['Cadastral Area'].find_one({'code': str(row['cad_code'])})
- if cad is None:
- bad_codes.append(row['cad_code'])
- continue
- caz = ai['Caza'].find_one({'id': cad['parentId']})
- gov = ai['Governorate'].find_one({'id': caz['parentId']})
-
- if p_code not in existing and site_name:
-
- payload = dict(
- id=int(random.getrandbits(31)),
- locationTypeId=int(target_list),
- name='{}: {}'.format(site_type, site_name)[0:40],
- axe='{}'.format(p_code),
- latitude=row['latitude'],
- longitude=row['longitude'],
- workflowstatusid='validated'
- )
- payload['E{}'.format(gov['levelId'])] = gov['id']
- payload['E{}'.format(caz['levelId'])] = caz['id']
- payload['E{}'.format(cad['levelId'])] = cad['id']
-
- response = ai_client.call_command('CreateLocation', **payload)
- if response.status_code == requests.codes.no_content:
- updated_sites += 1
- print 'Updated {}'.format(payload['name'])
- else:
- print 'Error for {}'.format(payload['name'])
-
- print 'Bad codes: {}'.format(bad_codes)
- print 'Updated sites: {}'.format(updated_sites)
- send_message('Updated {} sites'.format(updated_sites))
-
-
@manager.command
-def update_ai_locations(type_id, username='', password=''):
- client = ActivityInfoClient(username, password)
-
- updated_location = 0
- for location in ai.locations.find({'ai_name': {'$regex': 'PG'}}):
-
- payload = {
- 'id': int(random.getrandbits(31)),
- 'locationTypeId': type_id,
- 'name': location['ai_name'],
- 'axe': '{}'.format(location['p_code']),
- 'latitude': location['latitude'],
- 'longitude': location['longitude'],
- 'workflowstatusid': 'validated'
- }
- for id, level in location['adminEntities'].items():
- payload['E{}'.format(id)] = level['id']
-
- response = client.call_command('CreateLocation', **payload)
- if response.status_code == requests.codes.ok:
- updated_location += 1
- print 'Uploaded {}'.format(location['ai_name'].encode('UTF-8'))
- else:
- print 'Error for: {}'.format(location['ai_name'].encode('UTF-8'))
-
- print updated_location
-
-
-@manager.command
-def import_ai(dbs, username='', password='', date=''):
+# def import_ai(dbs, username='', password='', date=''):
+def import_ai(dbs, username='', password=''):
"""
Imports data from Activity Info
"""
+ # FIXME - dont hardcode this -- check out activity info wrapper
+ # for info on how the date is handled
+ date = '2017-10'
+
db_ids = dbs.split(',')
client = ActivityInfoClient(username, password)
for db_id in db_ids:
reports_created = 0
db_info = client.get_database(db_id)
+
send_message('AI import started for database: {}'.format(db_info['name']))
# 'store the whole database for future reference'
db_info['_id'] = db_id
- ai.databases.update({'_id': db_id}, db_info, upsert=True)
+ ai[db_id].update({'_id': db_id}, db_info, upsert=True)
# 'split out all the attribute groups into a separate collection'
- attribs = ai.databases.aggregate([
+ attribs = ai[db_id].aggregate([
{'$project': {'groups': '$activities.attributeGroups'}},
{'$unwind': '$groups'},
{'$unwind': '$groups'},
{'$group': {'_id': "$_id", 'groups': {'$push': '$groups'}}},
])
- for attrib in attribs['result'][0]['groups']:
- attrib['_id'] = attrib['id']
- ai.attributeGroups.update({'_id': attrib['id']}, attrib, upsert=True)
+
+ for attr_row in attribs: # ['result'][0]['groups']:
+ attribs = attr_row.get('groups')
+
+ if len(attribs) == 0:
+ continue
+
+ ## not sure why / if i need two loops here
+ for attrib in attribs:
+ attrib['_id'] = attrib['id']
+ ai.attributeGroups.update({'_id': attrib['id']}, attrib, upsert=True)
+
+ try:
+ ai_client_sites = client.get_sites(database=db_id)
+ except Exception:
+ continue
# 'create an index of sites by id'
sites = dict(
(site['id'], dict(site, index=i))
- for (i, site) in enumerate(
- client.get_sites(database=db_id)
- )
+ for (i, site) in enumerate(ai_client_sites)
)
# 'create an index of activities by id'
activities = dict(
(activity['id'], dict(activity, index=i))
for (i, activity) in enumerate(
- ai.databases.aggregate([
+ ai[db_id].aggregate([
{'$match': {'_id': db_id}},
{'$unwind': '$activities'},
{'$project': {
@@ -208,7 +136,7 @@ def import_ai(dbs, username='', password='', date=''):
'category': '$activities.category',
'location': '$activities.locationType'
}},
- ])['result']
+ ])
)
)
@@ -217,12 +145,28 @@ def import_ai(dbs, username='', password='', date=''):
date = datetime.date.today().strftime('%Y-%m')
send_message('Pulling reports for date: {}'.format(date))
- forms = client.get_cube(activities.keys(), month=date)
+ form_request_string = get_cube(activities.keys(), month=date)
+ response = requests.get(
+ 'https://www.activityinfo.org/' + form_request_string,
+ params={},
+ auth=HTTPBasicAuth(os.getenv('AI_USERNAME'), os.getenv('AI_PASSWORD')),
+ )
+ try:
+ forms = response.json()
+ except Exception:
+ continue
- # 'processing {} forms'.format(len(forms))
for indicator in forms:
- site = sites[indicator['key']['Site']['id']]
+ ## need help looking at validity of the data / logic..
+ ## i see this in the "sites" dict, so using for now
+ indicator_id = indicator['key']['Site']['id']
+ site = sites.get(indicator_id)
+
+ if not site:
+ print '==-=-= no site =-=-=-='
+ continue
+
attributes = []
if 'attributes' in site:
attributes = [
@@ -231,19 +175,39 @@ def import_ai(dbs, username='', password='', date=''):
{'name': 1, 'mandatory': 1, "attributes.$": 1}
)
]
+
if indicator['sum']:
- report, created = Report.objects.get_or_create(
- db_name=db_info['name'],
- date='{}-{}'.format(
- indicator['key']['Date']['year'],
- indicator['key']['Date']['month'],
- ),
- site_id=site['id'],
- activity_id=site['activity'],
- partner_id=site['partner']['id'],
- indicator_id=indicator['key']['Indicator']['id'],
- )
- activity = activities[report.activity_id]
+
+ date_info = indicator.get('key', {}).get('DateDimension.MONTH')
+ year, month = date_info.get('year'), date_info.get('month')
+
+ created = False
+
+ report_data = {
+ 'db_name':db_info['name'],
+ 'date':'{year}-{month}'.format(year=year, month=month),
+ 'site_id':site['id'],
+ 'activity_id':site['activity'],
+ 'partner_id':site['partner']['id'],
+ 'indicator_id':indicator['key']['Indicator']['id'],
+ }
+
+ try:
+ report = Report.objects.get(**report_data)
+ # http://docs.mongoengine.org/guide/querying.html#retrieving-unique-results
+ except Report.DoesNotExist:
+ report = Report.objects.create(**report_data)
+ created = True
+
+ report.save()
+
+ try:
+ activity = activities[report.activity_id]
+ except Exception as er:
+ print 'activity exception'
+ print err
+ continue
+
report.value = indicator['sum']
report.category = activity['category']
report.activity = activity['name']
@@ -277,11 +241,26 @@ def import_ai(dbs, username='', password='', date=''):
)
reports_created += 1
+ print '=save report at bottom='
report.save()
send_message('AI import finished, {} site reports created'.format(reports_created))
+# https://github.com/HCDX/ActivityInfoPython/blob/master/activityinfo_client.py#L102
+def get_cube(form_ids, month=None):
+ return (
+ 'resources/sites/cube?'
+ 'dimension=indicator'
+ '&dimension=site'
+ '&dimension=month'
+ '{}'
+ '&form={}'.format(
+ '&month='+month if month is not None else '',
+ '&form='.join([str(id) for id in form_ids])
+ ))
+
+
# Turn on debugger by default and reloader
manager.add_command("runserver", Server(
use_debugger=True,
diff --git a/api/requirements.txt b/api/requirements.txt
new file mode 100644
index 0000000..e0a93ce
--- /dev/null
+++ b/api/requirements.txt
@@ -0,0 +1,40 @@
+activityinfo-python==1.6.0
+blinker==1.4
+cartodb==0.8.1
+certifi==2017.7.27.1
+chardet==3.0.4
+cleancat==0.5.5
+click==6.7
+contextlib2==0.5.5
+Flask==0.12.2
+Flask-Admin==1.5.0
+Flask-Login==0.4.0
+flask-mongoengine==0.9.3
+Flask-MongoRest==0.2.3
+Flask-OAuthlib==0.9.4
+Flask-Script==2.0.6
+Flask-Views==0.2.1
+Flask-WTF==0.14.2
+funcsigs==1.0.2
+httplib2==0.10.3
+idna==2.6
+itsdangerous==0.24
+Jinja2==2.9.6
+MarkupSafe==1.0
+mimerender==0.6.0
+mock==2.0.0
+mongoengine==0.14.3
+oauth2==1.9.0.post1
+oauthlib==2.0.4
+pbr==3.1.1
+pymongo==3.5.1
+python-dateutil==2.6.1
+python-mimeparse==1.6.0
+pytz==2017.2
+raven==6.2.1
+requests==2.18.4
+requests-oauthlib==0.8.0
+six==1.11.0
+urllib3==1.22
+Werkzeug==0.12.2
+WTForms==2.1
diff --git a/spongemap.py b/api/spongemap.py
similarity index 93%
rename from spongemap.py
rename to api/spongemap.py
index f3742ee..0152656 100644
--- a/spongemap.py
+++ b/api/spongemap.py
@@ -8,7 +8,7 @@
import datetime
import logging
-from pandas import DataFrame
+# from pandas import DataFrame
from raven.contrib.flask import Sentry
from flask import g, session, request, url_for, flash
@@ -19,22 +19,22 @@
from flask import request
from flask import send_file
from flask import url_for
-from flask.ext import admin
-from flask.ext.mongoengine import MongoEngine
-from flask.ext.mongoengine.json import MongoEngineJSONEncoder
-from flask.ext.admin.contrib.mongoengine import ModelView
-from flask.ext.admin import expose, helpers
-from flask.ext.admin.actions import action
-from flask.ext.admin.babel import gettext
-from flask.ext.admin.contrib.mongoengine.filters import BaseMongoEngineFilter
-
-from flask.ext.mongorest import MongoRest
-from flask.ext.mongorest.authentication import AuthenticationBase
-from flask.ext.mongorest.views import ResourceView
-from flask.ext.mongorest.resources import Resource
-from flask.ext.mongorest import operators as ops
-from flask.ext.mongorest import methods
-
+from flask_mongoengine import MongoEngine
+from flask_mongoengine.json import MongoEngineJSONEncoder
+from flask_admin.contrib.mongoengine import ModelView
+from flask_admin import expose, helpers
+from flask_admin.actions import action
+from flask_admin.babel import gettext
+from flask_admin.contrib.mongoengine.filters import BaseMongoEngineFilter
+
+from flask_mongorest import MongoRest
+from flask_mongorest.authentication import AuthenticationBase
+from flask_mongorest.views import ResourceView
+from flask_mongorest.resources import Resource
+from flask_mongorest import operators as ops
+from flask_mongorest import methods
+
+import flask_admin as admin
import flask_login as login
from flask_login import AnonymousUserMixin
@@ -42,6 +42,7 @@
from wtforms import form, fields, validators
from werkzeug.security import generate_password_hash, check_password_hash
+from pymongo import MongoClient
class JSONEncoder(MongoEngineJSONEncoder):
@@ -51,6 +52,17 @@ def default(self, o):
return super(MongoEngineJSONEncoder, self).default(self, o)
+def get_db(app):
+# Create models
+ # db = MongoEngine(os.environ['DB_PORT_27017_TCP_ADDR'], 27017)
+ # db = MongoEngine()
+ db = MongoClient(os.environ['DB_PORT_27017_TCP_ADDR'], 27017)['ai-aggregator']
+ db.init_app(app)
+ login_manager.init_app(app)
+ app.json_encoder = JSONEncoder
+
+ return db
+
# Create application
app = Flask(__name__)
login_manager = login.LoginManager()
@@ -61,19 +73,12 @@ def default(self, o):
app.config['SECRET_KEY'] = '123456790'
app.config['MONGODB_SETTINGS'] = {
'db': 'ai-aggregator',
- 'host': os.environ.get('MONGODB_URL', 'mongodb://localhost:27017/ai-aggregator'),
+ 'host': os.environ['DB_PORT_27017_TCP_ADDR'],
+ 'port': 27017
}
-app.config.update(
- CELERY_BROKER_URL=os.environ.get('REDIS_URL', 'redis://localhost:6379/0'),
- CELERY_RESULT_BACKEND=os.environ.get('REDIS_URL', 'redis://localhost:6379/0')
-)
-# Create models
db = MongoEngine()
db.init_app(app)
-login_manager.init_app(app)
-app.json_encoder = JSONEncoder
-
# Create user loader function
@login_manager.user_loader
@@ -458,7 +463,6 @@ def export(self):
# Add API
api = MongoRest(app)
-
class AttributeResource(Resource):
document = Attribute
@@ -561,3 +565,7 @@ def oauthorized():
if __name__ == '__main__':
app.run()
+
+
+if __name__ == "__main__":
+ app.run(host='0.0.0.0', debug=True)
diff --git a/static/bootstrap-3.1.1-dist/css/bootstrap-theme.css b/api/static/bootstrap-3.1.1-dist/css/bootstrap-theme.css
similarity index 100%
rename from static/bootstrap-3.1.1-dist/css/bootstrap-theme.css
rename to api/static/bootstrap-3.1.1-dist/css/bootstrap-theme.css
diff --git a/static/bootstrap-3.1.1-dist/css/bootstrap-theme.css.map b/api/static/bootstrap-3.1.1-dist/css/bootstrap-theme.css.map
similarity index 100%
rename from static/bootstrap-3.1.1-dist/css/bootstrap-theme.css.map
rename to api/static/bootstrap-3.1.1-dist/css/bootstrap-theme.css.map
diff --git a/static/bootstrap-3.1.1-dist/css/bootstrap-theme.min.css b/api/static/bootstrap-3.1.1-dist/css/bootstrap-theme.min.css
similarity index 100%
rename from static/bootstrap-3.1.1-dist/css/bootstrap-theme.min.css
rename to api/static/bootstrap-3.1.1-dist/css/bootstrap-theme.min.css
diff --git a/static/bootstrap-3.1.1-dist/css/bootstrap.css b/api/static/bootstrap-3.1.1-dist/css/bootstrap.css
similarity index 100%
rename from static/bootstrap-3.1.1-dist/css/bootstrap.css
rename to api/static/bootstrap-3.1.1-dist/css/bootstrap.css
diff --git a/static/bootstrap-3.1.1-dist/css/bootstrap.css.map b/api/static/bootstrap-3.1.1-dist/css/bootstrap.css.map
similarity index 100%
rename from static/bootstrap-3.1.1-dist/css/bootstrap.css.map
rename to api/static/bootstrap-3.1.1-dist/css/bootstrap.css.map
diff --git a/static/bootstrap-3.1.1-dist/css/bootstrap.min.css b/api/static/bootstrap-3.1.1-dist/css/bootstrap.min.css
similarity index 100%
rename from static/bootstrap-3.1.1-dist/css/bootstrap.min.css
rename to api/static/bootstrap-3.1.1-dist/css/bootstrap.min.css
diff --git a/static/bootstrap-3.1.1-dist/fonts/glyphicons-halflings-regular.eot b/api/static/bootstrap-3.1.1-dist/fonts/glyphicons-halflings-regular.eot
similarity index 100%
rename from static/bootstrap-3.1.1-dist/fonts/glyphicons-halflings-regular.eot
rename to api/static/bootstrap-3.1.1-dist/fonts/glyphicons-halflings-regular.eot
diff --git a/static/bootstrap-3.1.1-dist/fonts/glyphicons-halflings-regular.svg b/api/static/bootstrap-3.1.1-dist/fonts/glyphicons-halflings-regular.svg
similarity index 100%
rename from static/bootstrap-3.1.1-dist/fonts/glyphicons-halflings-regular.svg
rename to api/static/bootstrap-3.1.1-dist/fonts/glyphicons-halflings-regular.svg
diff --git a/static/bootstrap-3.1.1-dist/fonts/glyphicons-halflings-regular.ttf b/api/static/bootstrap-3.1.1-dist/fonts/glyphicons-halflings-regular.ttf
similarity index 100%
rename from static/bootstrap-3.1.1-dist/fonts/glyphicons-halflings-regular.ttf
rename to api/static/bootstrap-3.1.1-dist/fonts/glyphicons-halflings-regular.ttf
diff --git a/static/bootstrap-3.1.1-dist/fonts/glyphicons-halflings-regular.woff b/api/static/bootstrap-3.1.1-dist/fonts/glyphicons-halflings-regular.woff
similarity index 100%
rename from static/bootstrap-3.1.1-dist/fonts/glyphicons-halflings-regular.woff
rename to api/static/bootstrap-3.1.1-dist/fonts/glyphicons-halflings-regular.woff
diff --git a/static/bootstrap-3.1.1-dist/js/bootstrap.js b/api/static/bootstrap-3.1.1-dist/js/bootstrap.js
similarity index 100%
rename from static/bootstrap-3.1.1-dist/js/bootstrap.js
rename to api/static/bootstrap-3.1.1-dist/js/bootstrap.js
diff --git a/static/bootstrap-3.1.1-dist/js/bootstrap.min.js b/api/static/bootstrap-3.1.1-dist/js/bootstrap.min.js
similarity index 100%
rename from static/bootstrap-3.1.1-dist/js/bootstrap.min.js
rename to api/static/bootstrap-3.1.1-dist/js/bootstrap.min.js
diff --git a/static/css/dark-theme.css b/api/static/css/dark-theme.css
similarity index 100%
rename from static/css/dark-theme.css
rename to api/static/css/dark-theme.css
diff --git a/static/css/light-theme.css b/api/static/css/light-theme.css
similarity index 100%
rename from static/css/light-theme.css
rename to api/static/css/light-theme.css
diff --git a/static/css/makeitresponsive.css b/api/static/css/makeitresponsive.css
similarity index 100%
rename from static/css/makeitresponsive.css
rename to api/static/css/makeitresponsive.css
diff --git a/static/css/spongemap.css b/api/static/css/spongemap.css
similarity index 100%
rename from static/css/spongemap.css
rename to api/static/css/spongemap.css
diff --git a/static/img/ajax-loader.gif b/api/static/img/ajax-loader.gif
similarity index 100%
rename from static/img/ajax-loader.gif
rename to api/static/img/ajax-loader.gif
diff --git a/static/img/tweet-actions.png b/api/static/img/tweet-actions.png
similarity index 100%
rename from static/img/tweet-actions.png
rename to api/static/img/tweet-actions.png
diff --git a/static/img/twitter_logo.png b/api/static/img/twitter_logo.png
similarity index 100%
rename from static/img/twitter_logo.png
rename to api/static/img/twitter_logo.png
diff --git a/static/js/jquery.table-filter-0.2.2/README.md b/api/static/js/jquery.table-filter-0.2.2/README.md
similarity index 100%
rename from static/js/jquery.table-filter-0.2.2/README.md
rename to api/static/js/jquery.table-filter-0.2.2/README.md
diff --git a/static/js/jquery.table-filter-0.2.2/jquery.table-filter.js b/api/static/js/jquery.table-filter-0.2.2/jquery.table-filter.js
similarity index 100%
rename from static/js/jquery.table-filter-0.2.2/jquery.table-filter.js
rename to api/static/js/jquery.table-filter-0.2.2/jquery.table-filter.js
diff --git a/static/js/jquery.table-filter-0.2.2/jquery.table-filter.min.js b/api/static/js/jquery.table-filter-0.2.2/jquery.table-filter.min.js
similarity index 100%
rename from static/js/jquery.table-filter-0.2.2/jquery.table-filter.min.js
rename to api/static/js/jquery.table-filter-0.2.2/jquery.table-filter.min.js
diff --git a/static/js/jquery.table-filter-0.2.2/table-filter.jquery.json b/api/static/js/jquery.table-filter-0.2.2/table-filter.jquery.json
similarity index 100%
rename from static/js/jquery.table-filter-0.2.2/table-filter.jquery.json
rename to api/static/js/jquery.table-filter-0.2.2/table-filter.jquery.json
diff --git a/static/js/jquery.table-filter-0.2.2/test.html b/api/static/js/jquery.table-filter-0.2.2/test.html
similarity index 100%
rename from static/js/jquery.table-filter-0.2.2/test.html
rename to api/static/js/jquery.table-filter-0.2.2/test.html
diff --git a/static/js/spongemap.js b/api/static/js/spongemap.js
similarity index 100%
rename from static/js/spongemap.js
rename to api/static/js/spongemap.js
diff --git a/static/js/tablesort/.gitattributes b/api/static/js/tablesort/.gitattributes
similarity index 100%
rename from static/js/tablesort/.gitattributes
rename to api/static/js/tablesort/.gitattributes
diff --git a/static/js/tablesort/.gitignore b/api/static/js/tablesort/.gitignore
similarity index 100%
rename from static/js/tablesort/.gitignore
rename to api/static/js/tablesort/.gitignore
diff --git a/static/js/tablesort/README.md b/api/static/js/tablesort/README.md
similarity index 100%
rename from static/js/tablesort/README.md
rename to api/static/js/tablesort/README.md
diff --git a/static/js/tablesort/addons/pager/icons/first.png b/api/static/js/tablesort/addons/pager/icons/first.png
similarity index 100%
rename from static/js/tablesort/addons/pager/icons/first.png
rename to api/static/js/tablesort/addons/pager/icons/first.png
diff --git a/static/js/tablesort/addons/pager/icons/last.png b/api/static/js/tablesort/addons/pager/icons/last.png
similarity index 100%
rename from static/js/tablesort/addons/pager/icons/last.png
rename to api/static/js/tablesort/addons/pager/icons/last.png
diff --git a/static/js/tablesort/addons/pager/icons/loading.gif b/api/static/js/tablesort/addons/pager/icons/loading.gif
similarity index 100%
rename from static/js/tablesort/addons/pager/icons/loading.gif
rename to api/static/js/tablesort/addons/pager/icons/loading.gif
diff --git a/static/js/tablesort/addons/pager/icons/next.png b/api/static/js/tablesort/addons/pager/icons/next.png
similarity index 100%
rename from static/js/tablesort/addons/pager/icons/next.png
rename to api/static/js/tablesort/addons/pager/icons/next.png
diff --git a/static/js/tablesort/addons/pager/icons/prev.png b/api/static/js/tablesort/addons/pager/icons/prev.png
similarity index 100%
rename from static/js/tablesort/addons/pager/icons/prev.png
rename to api/static/js/tablesort/addons/pager/icons/prev.png
diff --git a/static/js/tablesort/addons/pager/jquery.tablesorter.pager.css b/api/static/js/tablesort/addons/pager/jquery.tablesorter.pager.css
similarity index 100%
rename from static/js/tablesort/addons/pager/jquery.tablesorter.pager.css
rename to api/static/js/tablesort/addons/pager/jquery.tablesorter.pager.css
diff --git a/static/js/tablesort/addons/pager/jquery.tablesorter.pager.js b/api/static/js/tablesort/addons/pager/jquery.tablesorter.pager.js
similarity index 100%
rename from static/js/tablesort/addons/pager/jquery.tablesorter.pager.js
rename to api/static/js/tablesort/addons/pager/jquery.tablesorter.pager.js
diff --git a/static/js/tablesort/addons/pager/jquery.tablesorter.pager.min.js b/api/static/js/tablesort/addons/pager/jquery.tablesorter.pager.min.js
similarity index 100%
rename from static/js/tablesort/addons/pager/jquery.tablesorter.pager.min.js
rename to api/static/js/tablesort/addons/pager/jquery.tablesorter.pager.min.js
diff --git a/static/js/tablesort/beta-testing/example-pager-custom-controls.html b/api/static/js/tablesort/beta-testing/example-pager-custom-controls.html
similarity index 100%
rename from static/js/tablesort/beta-testing/example-pager-custom-controls.html
rename to api/static/js/tablesort/beta-testing/example-pager-custom-controls.html
diff --git a/static/js/tablesort/beta-testing/example-widget-column-reorder.html b/api/static/js/tablesort/beta-testing/example-widget-column-reorder.html
similarity index 100%
rename from static/js/tablesort/beta-testing/example-widget-column-reorder.html
rename to api/static/js/tablesort/beta-testing/example-widget-column-reorder.html
diff --git a/static/js/tablesort/beta-testing/pager-custom-controls.js b/api/static/js/tablesort/beta-testing/pager-custom-controls.js
similarity index 100%
rename from static/js/tablesort/beta-testing/pager-custom-controls.js
rename to api/static/js/tablesort/beta-testing/pager-custom-controls.js
diff --git a/static/js/tablesort/beta-testing/widget-reorder.js b/api/static/js/tablesort/beta-testing/widget-reorder.js
similarity index 100%
rename from static/js/tablesort/beta-testing/widget-reorder.js
rename to api/static/js/tablesort/beta-testing/widget-reorder.js
diff --git a/static/js/tablesort/bower.json b/api/static/js/tablesort/bower.json
similarity index 100%
rename from static/js/tablesort/bower.json
rename to api/static/js/tablesort/bower.json
diff --git a/static/js/tablesort/changelog.txt b/api/static/js/tablesort/changelog.txt
similarity index 100%
rename from static/js/tablesort/changelog.txt
rename to api/static/js/tablesort/changelog.txt
diff --git a/static/js/tablesort/css/bootstrap.less b/api/static/js/tablesort/css/bootstrap.less
similarity index 100%
rename from static/js/tablesort/css/bootstrap.less
rename to api/static/js/tablesort/css/bootstrap.less
diff --git a/static/js/tablesort/css/filter.formatter.css b/api/static/js/tablesort/css/filter.formatter.css
similarity index 100%
rename from static/js/tablesort/css/filter.formatter.css
rename to api/static/js/tablesort/css/filter.formatter.css
diff --git a/static/js/tablesort/css/images/black-asc.gif b/api/static/js/tablesort/css/images/black-asc.gif
similarity index 100%
rename from static/js/tablesort/css/images/black-asc.gif
rename to api/static/js/tablesort/css/images/black-asc.gif
diff --git a/static/js/tablesort/css/images/black-desc.gif b/api/static/js/tablesort/css/images/black-desc.gif
similarity index 100%
rename from static/js/tablesort/css/images/black-desc.gif
rename to api/static/js/tablesort/css/images/black-desc.gif
diff --git a/static/js/tablesort/css/images/black-unsorted.gif b/api/static/js/tablesort/css/images/black-unsorted.gif
similarity index 100%
rename from static/js/tablesort/css/images/black-unsorted.gif
rename to api/static/js/tablesort/css/images/black-unsorted.gif
diff --git a/static/js/tablesort/css/images/bootstrap-black-unsorted.png b/api/static/js/tablesort/css/images/bootstrap-black-unsorted.png
similarity index 100%
rename from static/js/tablesort/css/images/bootstrap-black-unsorted.png
rename to api/static/js/tablesort/css/images/bootstrap-black-unsorted.png
diff --git a/static/js/tablesort/css/images/bootstrap-white-unsorted.png b/api/static/js/tablesort/css/images/bootstrap-white-unsorted.png
similarity index 100%
rename from static/js/tablesort/css/images/bootstrap-white-unsorted.png
rename to api/static/js/tablesort/css/images/bootstrap-white-unsorted.png
diff --git a/static/js/tablesort/css/images/dropbox-asc-hovered.png b/api/static/js/tablesort/css/images/dropbox-asc-hovered.png
similarity index 100%
rename from static/js/tablesort/css/images/dropbox-asc-hovered.png
rename to api/static/js/tablesort/css/images/dropbox-asc-hovered.png
diff --git a/static/js/tablesort/css/images/dropbox-asc.png b/api/static/js/tablesort/css/images/dropbox-asc.png
similarity index 100%
rename from static/js/tablesort/css/images/dropbox-asc.png
rename to api/static/js/tablesort/css/images/dropbox-asc.png
diff --git a/static/js/tablesort/css/images/dropbox-desc-hovered.png b/api/static/js/tablesort/css/images/dropbox-desc-hovered.png
similarity index 100%
rename from static/js/tablesort/css/images/dropbox-desc-hovered.png
rename to api/static/js/tablesort/css/images/dropbox-desc-hovered.png
diff --git a/static/js/tablesort/css/images/dropbox-desc.png b/api/static/js/tablesort/css/images/dropbox-desc.png
similarity index 100%
rename from static/js/tablesort/css/images/dropbox-desc.png
rename to api/static/js/tablesort/css/images/dropbox-desc.png
diff --git a/static/js/tablesort/css/images/green-asc.gif b/api/static/js/tablesort/css/images/green-asc.gif
similarity index 100%
rename from static/js/tablesort/css/images/green-asc.gif
rename to api/static/js/tablesort/css/images/green-asc.gif
diff --git a/static/js/tablesort/css/images/green-desc.gif b/api/static/js/tablesort/css/images/green-desc.gif
similarity index 100%
rename from static/js/tablesort/css/images/green-desc.gif
rename to api/static/js/tablesort/css/images/green-desc.gif
diff --git a/static/js/tablesort/css/images/green-header.gif b/api/static/js/tablesort/css/images/green-header.gif
similarity index 100%
rename from static/js/tablesort/css/images/green-header.gif
rename to api/static/js/tablesort/css/images/green-header.gif
diff --git a/static/js/tablesort/css/images/green-unsorted.gif b/api/static/js/tablesort/css/images/green-unsorted.gif
similarity index 100%
rename from static/js/tablesort/css/images/green-unsorted.gif
rename to api/static/js/tablesort/css/images/green-unsorted.gif
diff --git a/static/js/tablesort/css/images/ice-asc.gif b/api/static/js/tablesort/css/images/ice-asc.gif
similarity index 100%
rename from static/js/tablesort/css/images/ice-asc.gif
rename to api/static/js/tablesort/css/images/ice-asc.gif
diff --git a/static/js/tablesort/css/images/ice-desc.gif b/api/static/js/tablesort/css/images/ice-desc.gif
similarity index 100%
rename from static/js/tablesort/css/images/ice-desc.gif
rename to api/static/js/tablesort/css/images/ice-desc.gif
diff --git a/static/js/tablesort/css/images/ice-unsorted.gif b/api/static/js/tablesort/css/images/ice-unsorted.gif
similarity index 100%
rename from static/js/tablesort/css/images/ice-unsorted.gif
rename to api/static/js/tablesort/css/images/ice-unsorted.gif
diff --git a/static/js/tablesort/css/images/metro-black-asc.png b/api/static/js/tablesort/css/images/metro-black-asc.png
similarity index 100%
rename from static/js/tablesort/css/images/metro-black-asc.png
rename to api/static/js/tablesort/css/images/metro-black-asc.png
diff --git a/static/js/tablesort/css/images/metro-black-desc.png b/api/static/js/tablesort/css/images/metro-black-desc.png
similarity index 100%
rename from static/js/tablesort/css/images/metro-black-desc.png
rename to api/static/js/tablesort/css/images/metro-black-desc.png
diff --git a/static/js/tablesort/css/images/metro-loading.gif b/api/static/js/tablesort/css/images/metro-loading.gif
similarity index 100%
rename from static/js/tablesort/css/images/metro-loading.gif
rename to api/static/js/tablesort/css/images/metro-loading.gif
diff --git a/static/js/tablesort/css/images/metro-unsorted.png b/api/static/js/tablesort/css/images/metro-unsorted.png
similarity index 100%
rename from static/js/tablesort/css/images/metro-unsorted.png
rename to api/static/js/tablesort/css/images/metro-unsorted.png
diff --git a/static/js/tablesort/css/images/metro-white-asc.png b/api/static/js/tablesort/css/images/metro-white-asc.png
similarity index 100%
rename from static/js/tablesort/css/images/metro-white-asc.png
rename to api/static/js/tablesort/css/images/metro-white-asc.png
diff --git a/static/js/tablesort/css/images/metro-white-desc.png b/api/static/js/tablesort/css/images/metro-white-desc.png
similarity index 100%
rename from static/js/tablesort/css/images/metro-white-desc.png
rename to api/static/js/tablesort/css/images/metro-white-desc.png
diff --git a/static/js/tablesort/css/images/white-asc.gif b/api/static/js/tablesort/css/images/white-asc.gif
similarity index 100%
rename from static/js/tablesort/css/images/white-asc.gif
rename to api/static/js/tablesort/css/images/white-asc.gif
diff --git a/static/js/tablesort/css/images/white-desc.gif b/api/static/js/tablesort/css/images/white-desc.gif
similarity index 100%
rename from static/js/tablesort/css/images/white-desc.gif
rename to api/static/js/tablesort/css/images/white-desc.gif
diff --git a/static/js/tablesort/css/images/white-unsorted.gif b/api/static/js/tablesort/css/images/white-unsorted.gif
similarity index 100%
rename from static/js/tablesort/css/images/white-unsorted.gif
rename to api/static/js/tablesort/css/images/white-unsorted.gif
diff --git a/static/js/tablesort/css/metro.less b/api/static/js/tablesort/css/metro.less
similarity index 100%
rename from static/js/tablesort/css/metro.less
rename to api/static/js/tablesort/css/metro.less
diff --git a/static/js/tablesort/css/psd/green-asc.psd b/api/static/js/tablesort/css/psd/green-asc.psd
similarity index 100%
rename from static/js/tablesort/css/psd/green-asc.psd
rename to api/static/js/tablesort/css/psd/green-asc.psd
diff --git a/static/js/tablesort/css/psd/green-desc.psd b/api/static/js/tablesort/css/psd/green-desc.psd
similarity index 100%
rename from static/js/tablesort/css/psd/green-desc.psd
rename to api/static/js/tablesort/css/psd/green-desc.psd
diff --git a/static/js/tablesort/css/psd/green-unsorted.psd b/api/static/js/tablesort/css/psd/green-unsorted.psd
similarity index 100%
rename from static/js/tablesort/css/psd/green-unsorted.psd
rename to api/static/js/tablesort/css/psd/green-unsorted.psd
diff --git a/static/js/tablesort/css/psd/metro-style.psd b/api/static/js/tablesort/css/psd/metro-style.psd
similarity index 100%
rename from static/js/tablesort/css/psd/metro-style.psd
rename to api/static/js/tablesort/css/psd/metro-style.psd
diff --git a/static/js/tablesort/css/theme.black-ice.css b/api/static/js/tablesort/css/theme.black-ice.css
similarity index 100%
rename from static/js/tablesort/css/theme.black-ice.css
rename to api/static/js/tablesort/css/theme.black-ice.css
diff --git a/static/js/tablesort/css/theme.blue.css b/api/static/js/tablesort/css/theme.blue.css
similarity index 100%
rename from static/js/tablesort/css/theme.blue.css
rename to api/static/js/tablesort/css/theme.blue.css
diff --git a/static/js/tablesort/css/theme.bootstrap.css b/api/static/js/tablesort/css/theme.bootstrap.css
similarity index 100%
rename from static/js/tablesort/css/theme.bootstrap.css
rename to api/static/js/tablesort/css/theme.bootstrap.css
diff --git a/static/js/tablesort/css/theme.bootstrap_2.css b/api/static/js/tablesort/css/theme.bootstrap_2.css
similarity index 100%
rename from static/js/tablesort/css/theme.bootstrap_2.css
rename to api/static/js/tablesort/css/theme.bootstrap_2.css
diff --git a/static/js/tablesort/css/theme.dark.css b/api/static/js/tablesort/css/theme.dark.css
similarity index 100%
rename from static/js/tablesort/css/theme.dark.css
rename to api/static/js/tablesort/css/theme.dark.css
diff --git a/static/js/tablesort/css/theme.default.css b/api/static/js/tablesort/css/theme.default.css
similarity index 100%
rename from static/js/tablesort/css/theme.default.css
rename to api/static/js/tablesort/css/theme.default.css
diff --git a/static/js/tablesort/css/theme.dropbox.css b/api/static/js/tablesort/css/theme.dropbox.css
similarity index 100%
rename from static/js/tablesort/css/theme.dropbox.css
rename to api/static/js/tablesort/css/theme.dropbox.css
diff --git a/static/js/tablesort/css/theme.green.css b/api/static/js/tablesort/css/theme.green.css
similarity index 100%
rename from static/js/tablesort/css/theme.green.css
rename to api/static/js/tablesort/css/theme.green.css
diff --git a/static/js/tablesort/css/theme.grey.css b/api/static/js/tablesort/css/theme.grey.css
similarity index 100%
rename from static/js/tablesort/css/theme.grey.css
rename to api/static/js/tablesort/css/theme.grey.css
diff --git a/static/js/tablesort/css/theme.ice.css b/api/static/js/tablesort/css/theme.ice.css
similarity index 100%
rename from static/js/tablesort/css/theme.ice.css
rename to api/static/js/tablesort/css/theme.ice.css
diff --git a/static/js/tablesort/css/theme.jui.css b/api/static/js/tablesort/css/theme.jui.css
similarity index 100%
rename from static/js/tablesort/css/theme.jui.css
rename to api/static/js/tablesort/css/theme.jui.css
diff --git a/static/js/tablesort/css/theme.less b/api/static/js/tablesort/css/theme.less
similarity index 100%
rename from static/js/tablesort/css/theme.less
rename to api/static/js/tablesort/css/theme.less
diff --git a/static/js/tablesort/css/theme.metro-dark.css b/api/static/js/tablesort/css/theme.metro-dark.css
similarity index 100%
rename from static/js/tablesort/css/theme.metro-dark.css
rename to api/static/js/tablesort/css/theme.metro-dark.css
diff --git a/static/js/tablesort/docs/assets/City0.json b/api/static/js/tablesort/docs/assets/City0.json
similarity index 100%
rename from static/js/tablesort/docs/assets/City0.json
rename to api/static/js/tablesort/docs/assets/City0.json
diff --git a/static/js/tablesort/docs/assets/City1.json b/api/static/js/tablesort/docs/assets/City1.json
similarity index 100%
rename from static/js/tablesort/docs/assets/City1.json
rename to api/static/js/tablesort/docs/assets/City1.json
diff --git a/static/js/tablesort/docs/assets/City2.json b/api/static/js/tablesort/docs/assets/City2.json
similarity index 100%
rename from static/js/tablesort/docs/assets/City2.json
rename to api/static/js/tablesort/docs/assets/City2.json
diff --git a/static/js/tablesort/docs/assets/City3.json b/api/static/js/tablesort/docs/assets/City3.json
similarity index 100%
rename from static/js/tablesort/docs/assets/City3.json
rename to api/static/js/tablesort/docs/assets/City3.json
diff --git a/static/js/tablesort/docs/assets/ajax-content.html b/api/static/js/tablesort/docs/assets/ajax-content.html
similarity index 100%
rename from static/js/tablesort/docs/assets/ajax-content.html
rename to api/static/js/tablesort/docs/assets/ajax-content.html
diff --git a/static/js/tablesort/docs/assets/build.json b/api/static/js/tablesort/docs/assets/build.json
similarity index 100%
rename from static/js/tablesort/docs/assets/build.json
rename to api/static/js/tablesort/docs/assets/build.json
diff --git a/static/js/tablesort/docs/assets/build.txt b/api/static/js/tablesort/docs/assets/build.txt
similarity index 100%
rename from static/js/tablesort/docs/assets/build.txt
rename to api/static/js/tablesort/docs/assets/build.txt
diff --git a/static/js/tablesort/docs/assets/theme_switcher.json b/api/static/js/tablesort/docs/assets/theme_switcher.json
similarity index 100%
rename from static/js/tablesort/docs/assets/theme_switcher.json
rename to api/static/js/tablesort/docs/assets/theme_switcher.json
diff --git a/static/js/tablesort/docs/css/bootstrap.min.css b/api/static/js/tablesort/docs/css/bootstrap.min.css
similarity index 100%
rename from static/js/tablesort/docs/css/bootstrap.min.css
rename to api/static/js/tablesort/docs/css/bootstrap.min.css
diff --git a/static/js/tablesort/docs/css/images/animated-overlay.gif b/api/static/js/tablesort/docs/css/images/animated-overlay.gif
similarity index 100%
rename from static/js/tablesort/docs/css/images/animated-overlay.gif
rename to api/static/js/tablesort/docs/css/images/animated-overlay.gif
diff --git a/static/js/tablesort/docs/css/images/ui-bg_diagonals-thick_18_b81900_40x40.png b/api/static/js/tablesort/docs/css/images/ui-bg_diagonals-thick_18_b81900_40x40.png
similarity index 100%
rename from static/js/tablesort/docs/css/images/ui-bg_diagonals-thick_18_b81900_40x40.png
rename to api/static/js/tablesort/docs/css/images/ui-bg_diagonals-thick_18_b81900_40x40.png
diff --git a/static/js/tablesort/docs/css/images/ui-bg_diagonals-thick_20_666666_40x40.png b/api/static/js/tablesort/docs/css/images/ui-bg_diagonals-thick_20_666666_40x40.png
similarity index 100%
rename from static/js/tablesort/docs/css/images/ui-bg_diagonals-thick_20_666666_40x40.png
rename to api/static/js/tablesort/docs/css/images/ui-bg_diagonals-thick_20_666666_40x40.png
diff --git a/static/js/tablesort/docs/css/images/ui-bg_diagonals-thick_90_eeeeee_40x40.png b/api/static/js/tablesort/docs/css/images/ui-bg_diagonals-thick_90_eeeeee_40x40.png
similarity index 100%
rename from static/js/tablesort/docs/css/images/ui-bg_diagonals-thick_90_eeeeee_40x40.png
rename to api/static/js/tablesort/docs/css/images/ui-bg_diagonals-thick_90_eeeeee_40x40.png
diff --git a/static/js/tablesort/docs/css/images/ui-bg_flat_10_000000_40x100.png b/api/static/js/tablesort/docs/css/images/ui-bg_flat_10_000000_40x100.png
similarity index 100%
rename from static/js/tablesort/docs/css/images/ui-bg_flat_10_000000_40x100.png
rename to api/static/js/tablesort/docs/css/images/ui-bg_flat_10_000000_40x100.png
diff --git a/static/js/tablesort/docs/css/images/ui-bg_flat_15_cd0a0a_40x100.png b/api/static/js/tablesort/docs/css/images/ui-bg_flat_15_cd0a0a_40x100.png
similarity index 100%
rename from static/js/tablesort/docs/css/images/ui-bg_flat_15_cd0a0a_40x100.png
rename to api/static/js/tablesort/docs/css/images/ui-bg_flat_15_cd0a0a_40x100.png
diff --git a/static/js/tablesort/docs/css/images/ui-bg_glass_100_e4f1fb_1x400.png b/api/static/js/tablesort/docs/css/images/ui-bg_glass_100_e4f1fb_1x400.png
similarity index 100%
rename from static/js/tablesort/docs/css/images/ui-bg_glass_100_e4f1fb_1x400.png
rename to api/static/js/tablesort/docs/css/images/ui-bg_glass_100_e4f1fb_1x400.png
diff --git a/static/js/tablesort/docs/css/images/ui-bg_glass_100_f6f6f6_1x400.png b/api/static/js/tablesort/docs/css/images/ui-bg_glass_100_f6f6f6_1x400.png
similarity index 100%
rename from static/js/tablesort/docs/css/images/ui-bg_glass_100_f6f6f6_1x400.png
rename to api/static/js/tablesort/docs/css/images/ui-bg_glass_100_f6f6f6_1x400.png
diff --git a/static/js/tablesort/docs/css/images/ui-bg_glass_100_fdf5ce_1x400.png b/api/static/js/tablesort/docs/css/images/ui-bg_glass_100_fdf5ce_1x400.png
similarity index 100%
rename from static/js/tablesort/docs/css/images/ui-bg_glass_100_fdf5ce_1x400.png
rename to api/static/js/tablesort/docs/css/images/ui-bg_glass_100_fdf5ce_1x400.png
diff --git a/static/js/tablesort/docs/css/images/ui-bg_glass_50_3baae3_1x400.png b/api/static/js/tablesort/docs/css/images/ui-bg_glass_50_3baae3_1x400.png
similarity index 100%
rename from static/js/tablesort/docs/css/images/ui-bg_glass_50_3baae3_1x400.png
rename to api/static/js/tablesort/docs/css/images/ui-bg_glass_50_3baae3_1x400.png
diff --git a/static/js/tablesort/docs/css/images/ui-bg_glass_65_ffffff_1x400.png b/api/static/js/tablesort/docs/css/images/ui-bg_glass_65_ffffff_1x400.png
similarity index 100%
rename from static/js/tablesort/docs/css/images/ui-bg_glass_65_ffffff_1x400.png
rename to api/static/js/tablesort/docs/css/images/ui-bg_glass_65_ffffff_1x400.png
diff --git a/static/js/tablesort/docs/css/images/ui-bg_glass_80_d7ebf9_1x400.png b/api/static/js/tablesort/docs/css/images/ui-bg_glass_80_d7ebf9_1x400.png
similarity index 100%
rename from static/js/tablesort/docs/css/images/ui-bg_glass_80_d7ebf9_1x400.png
rename to api/static/js/tablesort/docs/css/images/ui-bg_glass_80_d7ebf9_1x400.png
diff --git a/static/js/tablesort/docs/css/images/ui-bg_gloss-wave_35_f6a828_500x100.png b/api/static/js/tablesort/docs/css/images/ui-bg_gloss-wave_35_f6a828_500x100.png
similarity index 100%
rename from static/js/tablesort/docs/css/images/ui-bg_gloss-wave_35_f6a828_500x100.png
rename to api/static/js/tablesort/docs/css/images/ui-bg_gloss-wave_35_f6a828_500x100.png
diff --git a/static/js/tablesort/docs/css/images/ui-bg_highlight-hard_100_f2f5f7_1x100.png b/api/static/js/tablesort/docs/css/images/ui-bg_highlight-hard_100_f2f5f7_1x100.png
similarity index 100%
rename from static/js/tablesort/docs/css/images/ui-bg_highlight-hard_100_f2f5f7_1x100.png
rename to api/static/js/tablesort/docs/css/images/ui-bg_highlight-hard_100_f2f5f7_1x100.png
diff --git a/static/js/tablesort/docs/css/images/ui-bg_highlight-hard_70_000000_1x100.png b/api/static/js/tablesort/docs/css/images/ui-bg_highlight-hard_70_000000_1x100.png
similarity index 100%
rename from static/js/tablesort/docs/css/images/ui-bg_highlight-hard_70_000000_1x100.png
rename to api/static/js/tablesort/docs/css/images/ui-bg_highlight-hard_70_000000_1x100.png
diff --git a/static/js/tablesort/docs/css/images/ui-bg_highlight-soft_100_deedf7_1x100.png b/api/static/js/tablesort/docs/css/images/ui-bg_highlight-soft_100_deedf7_1x100.png
similarity index 100%
rename from static/js/tablesort/docs/css/images/ui-bg_highlight-soft_100_deedf7_1x100.png
rename to api/static/js/tablesort/docs/css/images/ui-bg_highlight-soft_100_deedf7_1x100.png
diff --git a/static/js/tablesort/docs/css/images/ui-bg_highlight-soft_100_eeeeee_1x100.png b/api/static/js/tablesort/docs/css/images/ui-bg_highlight-soft_100_eeeeee_1x100.png
similarity index 100%
rename from static/js/tablesort/docs/css/images/ui-bg_highlight-soft_100_eeeeee_1x100.png
rename to api/static/js/tablesort/docs/css/images/ui-bg_highlight-soft_100_eeeeee_1x100.png
diff --git a/static/js/tablesort/docs/css/images/ui-bg_highlight-soft_25_ffef8f_1x100.png b/api/static/js/tablesort/docs/css/images/ui-bg_highlight-soft_25_ffef8f_1x100.png
similarity index 100%
rename from static/js/tablesort/docs/css/images/ui-bg_highlight-soft_25_ffef8f_1x100.png
rename to api/static/js/tablesort/docs/css/images/ui-bg_highlight-soft_25_ffef8f_1x100.png
diff --git a/static/js/tablesort/docs/css/images/ui-bg_highlight-soft_75_ffe45c_1x100.png b/api/static/js/tablesort/docs/css/images/ui-bg_highlight-soft_75_ffe45c_1x100.png
similarity index 100%
rename from static/js/tablesort/docs/css/images/ui-bg_highlight-soft_75_ffe45c_1x100.png
rename to api/static/js/tablesort/docs/css/images/ui-bg_highlight-soft_75_ffe45c_1x100.png
diff --git a/static/js/tablesort/docs/css/images/ui-icons_222222_256x240.png b/api/static/js/tablesort/docs/css/images/ui-icons_222222_256x240.png
similarity index 100%
rename from static/js/tablesort/docs/css/images/ui-icons_222222_256x240.png
rename to api/static/js/tablesort/docs/css/images/ui-icons_222222_256x240.png
diff --git a/static/js/tablesort/docs/css/images/ui-icons_228ef1_256x240.png b/api/static/js/tablesort/docs/css/images/ui-icons_228ef1_256x240.png
similarity index 100%
rename from static/js/tablesort/docs/css/images/ui-icons_228ef1_256x240.png
rename to api/static/js/tablesort/docs/css/images/ui-icons_228ef1_256x240.png
diff --git a/static/js/tablesort/docs/css/images/ui-icons_2694e8_256x240.png b/api/static/js/tablesort/docs/css/images/ui-icons_2694e8_256x240.png
similarity index 100%
rename from static/js/tablesort/docs/css/images/ui-icons_2694e8_256x240.png
rename to api/static/js/tablesort/docs/css/images/ui-icons_2694e8_256x240.png
diff --git a/static/js/tablesort/docs/css/images/ui-icons_2e83ff_256x240.png b/api/static/js/tablesort/docs/css/images/ui-icons_2e83ff_256x240.png
similarity index 100%
rename from static/js/tablesort/docs/css/images/ui-icons_2e83ff_256x240.png
rename to api/static/js/tablesort/docs/css/images/ui-icons_2e83ff_256x240.png
diff --git a/static/js/tablesort/docs/css/images/ui-icons_3d80b3_256x240.png b/api/static/js/tablesort/docs/css/images/ui-icons_3d80b3_256x240.png
similarity index 100%
rename from static/js/tablesort/docs/css/images/ui-icons_3d80b3_256x240.png
rename to api/static/js/tablesort/docs/css/images/ui-icons_3d80b3_256x240.png
diff --git a/static/js/tablesort/docs/css/images/ui-icons_72a7cf_256x240.png b/api/static/js/tablesort/docs/css/images/ui-icons_72a7cf_256x240.png
similarity index 100%
rename from static/js/tablesort/docs/css/images/ui-icons_72a7cf_256x240.png
rename to api/static/js/tablesort/docs/css/images/ui-icons_72a7cf_256x240.png
diff --git a/static/js/tablesort/docs/css/images/ui-icons_ef8c08_256x240.png b/api/static/js/tablesort/docs/css/images/ui-icons_ef8c08_256x240.png
similarity index 100%
rename from static/js/tablesort/docs/css/images/ui-icons_ef8c08_256x240.png
rename to api/static/js/tablesort/docs/css/images/ui-icons_ef8c08_256x240.png
diff --git a/static/js/tablesort/docs/css/images/ui-icons_ffd27a_256x240.png b/api/static/js/tablesort/docs/css/images/ui-icons_ffd27a_256x240.png
similarity index 100%
rename from static/js/tablesort/docs/css/images/ui-icons_ffd27a_256x240.png
rename to api/static/js/tablesort/docs/css/images/ui-icons_ffd27a_256x240.png
diff --git a/static/js/tablesort/docs/css/images/ui-icons_ffffff_256x240.png b/api/static/js/tablesort/docs/css/images/ui-icons_ffffff_256x240.png
similarity index 100%
rename from static/js/tablesort/docs/css/images/ui-icons_ffffff_256x240.png
rename to api/static/js/tablesort/docs/css/images/ui-icons_ffffff_256x240.png
diff --git a/static/js/tablesort/docs/css/jq.css b/api/static/js/tablesort/docs/css/jq.css
similarity index 100%
rename from static/js/tablesort/docs/css/jq.css
rename to api/static/js/tablesort/docs/css/jq.css
diff --git a/static/js/tablesort/docs/css/jquery-ui.min.css b/api/static/js/tablesort/docs/css/jquery-ui.min.css
similarity index 100%
rename from static/js/tablesort/docs/css/jquery-ui.min.css
rename to api/static/js/tablesort/docs/css/jquery-ui.min.css
diff --git a/static/js/tablesort/docs/css/menu.css b/api/static/js/tablesort/docs/css/menu.css
similarity index 100%
rename from static/js/tablesort/docs/css/menu.css
rename to api/static/js/tablesort/docs/css/menu.css
diff --git a/static/js/tablesort/docs/css/prettify.css b/api/static/js/tablesort/docs/css/prettify.css
similarity index 100%
rename from static/js/tablesort/docs/css/prettify.css
rename to api/static/js/tablesort/docs/css/prettify.css
diff --git a/static/js/tablesort/docs/css/select2-3.4.6.min.css b/api/static/js/tablesort/docs/css/select2-3.4.6.min.css
similarity index 100%
rename from static/js/tablesort/docs/css/select2-3.4.6.min.css
rename to api/static/js/tablesort/docs/css/select2-3.4.6.min.css
diff --git a/static/js/tablesort/docs/css/select2-spinner.gif b/api/static/js/tablesort/docs/css/select2-spinner.gif
similarity index 100%
rename from static/js/tablesort/docs/css/select2-spinner.gif
rename to api/static/js/tablesort/docs/css/select2-spinner.gif
diff --git a/static/js/tablesort/docs/css/select2.png b/api/static/js/tablesort/docs/css/select2.png
similarity index 100%
rename from static/js/tablesort/docs/css/select2.png
rename to api/static/js/tablesort/docs/css/select2.png
diff --git a/static/js/tablesort/docs/css/select2x2.png b/api/static/js/tablesort/docs/css/select2x2.png
similarity index 100%
rename from static/js/tablesort/docs/css/select2x2.png
rename to api/static/js/tablesort/docs/css/select2x2.png
diff --git a/static/js/tablesort/docs/css/tipsy.css b/api/static/js/tablesort/docs/css/tipsy.css
similarity index 100%
rename from static/js/tablesort/docs/css/tipsy.css
rename to api/static/js/tablesort/docs/css/tipsy.css
diff --git a/static/js/tablesort/docs/example-add-rows.html b/api/static/js/tablesort/docs/example-add-rows.html
similarity index 100%
rename from static/js/tablesort/docs/example-add-rows.html
rename to api/static/js/tablesort/docs/example-add-rows.html
diff --git a/static/js/tablesort/docs/example-ajax.html b/api/static/js/tablesort/docs/example-ajax.html
similarity index 100%
rename from static/js/tablesort/docs/example-ajax.html
rename to api/static/js/tablesort/docs/example-ajax.html
diff --git a/static/js/tablesort/docs/example-apply-widget.html b/api/static/js/tablesort/docs/example-apply-widget.html
similarity index 100%
rename from static/js/tablesort/docs/example-apply-widget.html
rename to api/static/js/tablesort/docs/example-apply-widget.html
diff --git a/static/js/tablesort/docs/example-child-rows-filtered.html b/api/static/js/tablesort/docs/example-child-rows-filtered.html
similarity index 100%
rename from static/js/tablesort/docs/example-child-rows-filtered.html
rename to api/static/js/tablesort/docs/example-child-rows-filtered.html
diff --git a/static/js/tablesort/docs/example-child-rows.html b/api/static/js/tablesort/docs/example-child-rows.html
similarity index 100%
rename from static/js/tablesort/docs/example-child-rows.html
rename to api/static/js/tablesort/docs/example-child-rows.html
diff --git a/static/js/tablesort/docs/example-empty-table.html b/api/static/js/tablesort/docs/example-empty-table.html
similarity index 100%
rename from static/js/tablesort/docs/example-empty-table.html
rename to api/static/js/tablesort/docs/example-empty-table.html
diff --git a/static/js/tablesort/docs/example-extending-defaults.html b/api/static/js/tablesort/docs/example-extending-defaults.html
similarity index 100%
rename from static/js/tablesort/docs/example-extending-defaults.html
rename to api/static/js/tablesort/docs/example-extending-defaults.html
diff --git a/static/js/tablesort/docs/example-extractors-parsers.html b/api/static/js/tablesort/docs/example-extractors-parsers.html
similarity index 100%
rename from static/js/tablesort/docs/example-extractors-parsers.html
rename to api/static/js/tablesort/docs/example-extractors-parsers.html
diff --git a/static/js/tablesort/docs/example-header-column-span.html b/api/static/js/tablesort/docs/example-header-column-span.html
similarity index 100%
rename from static/js/tablesort/docs/example-header-column-span.html
rename to api/static/js/tablesort/docs/example-header-column-span.html
diff --git a/static/js/tablesort/docs/example-locale-sort.html b/api/static/js/tablesort/docs/example-locale-sort.html
similarity index 100%
rename from static/js/tablesort/docs/example-locale-sort.html
rename to api/static/js/tablesort/docs/example-locale-sort.html
diff --git a/static/js/tablesort/docs/example-meta-headers.html b/api/static/js/tablesort/docs/example-meta-headers.html
similarity index 100%
rename from static/js/tablesort/docs/example-meta-headers.html
rename to api/static/js/tablesort/docs/example-meta-headers.html
diff --git a/static/js/tablesort/docs/example-meta-parsers.html b/api/static/js/tablesort/docs/example-meta-parsers.html
similarity index 100%
rename from static/js/tablesort/docs/example-meta-parsers.html
rename to api/static/js/tablesort/docs/example-meta-parsers.html
diff --git a/static/js/tablesort/docs/example-meta-sort-list.html b/api/static/js/tablesort/docs/example-meta-sort-list.html
similarity index 100%
rename from static/js/tablesort/docs/example-meta-sort-list.html
rename to api/static/js/tablesort/docs/example-meta-sort-list.html
diff --git a/static/js/tablesort/docs/example-method-sortreset.html b/api/static/js/tablesort/docs/example-method-sortreset.html
similarity index 100%
rename from static/js/tablesort/docs/example-method-sortreset.html
rename to api/static/js/tablesort/docs/example-method-sortreset.html
diff --git a/static/js/tablesort/docs/example-multiple-tbodies.html b/api/static/js/tablesort/docs/example-multiple-tbodies.html
similarity index 100%
rename from static/js/tablesort/docs/example-multiple-tbodies.html
rename to api/static/js/tablesort/docs/example-multiple-tbodies.html
diff --git a/static/js/tablesort/docs/example-option-custom-sort.html b/api/static/js/tablesort/docs/example-option-custom-sort.html
similarity index 100%
rename from static/js/tablesort/docs/example-option-custom-sort.html
rename to api/static/js/tablesort/docs/example-option-custom-sort.html
diff --git a/static/js/tablesort/docs/example-option-date-format.html b/api/static/js/tablesort/docs/example-option-date-format.html
similarity index 100%
rename from static/js/tablesort/docs/example-option-date-format.html
rename to api/static/js/tablesort/docs/example-option-date-format.html
diff --git a/static/js/tablesort/docs/example-option-debug.html b/api/static/js/tablesort/docs/example-option-debug.html
similarity index 100%
rename from static/js/tablesort/docs/example-option-debug.html
rename to api/static/js/tablesort/docs/example-option-debug.html
diff --git a/static/js/tablesort/docs/example-option-delay-init.html b/api/static/js/tablesort/docs/example-option-delay-init.html
similarity index 100%
rename from static/js/tablesort/docs/example-option-delay-init.html
rename to api/static/js/tablesort/docs/example-option-delay-init.html
diff --git a/static/js/tablesort/docs/example-option-digits.html b/api/static/js/tablesort/docs/example-option-digits.html
similarity index 100%
rename from static/js/tablesort/docs/example-option-digits.html
rename to api/static/js/tablesort/docs/example-option-digits.html
diff --git a/static/js/tablesort/docs/example-option-render-header.html b/api/static/js/tablesort/docs/example-option-render-header.html
similarity index 100%
rename from static/js/tablesort/docs/example-option-render-header.html
rename to api/static/js/tablesort/docs/example-option-render-header.html
diff --git a/static/js/tablesort/docs/example-option-render-template.html b/api/static/js/tablesort/docs/example-option-render-template.html
similarity index 100%
rename from static/js/tablesort/docs/example-option-render-template.html
rename to api/static/js/tablesort/docs/example-option-render-template.html
diff --git a/static/js/tablesort/docs/example-option-selectorsort.html b/api/static/js/tablesort/docs/example-option-selectorsort.html
similarity index 100%
rename from static/js/tablesort/docs/example-option-selectorsort.html
rename to api/static/js/tablesort/docs/example-option-selectorsort.html
diff --git a/static/js/tablesort/docs/example-option-show-processing.html b/api/static/js/tablesort/docs/example-option-show-processing.html
similarity index 100%
rename from static/js/tablesort/docs/example-option-show-processing.html
rename to api/static/js/tablesort/docs/example-option-show-processing.html
diff --git a/static/js/tablesort/docs/example-option-sort-append.html b/api/static/js/tablesort/docs/example-option-sort-append.html
similarity index 100%
rename from static/js/tablesort/docs/example-option-sort-append.html
rename to api/static/js/tablesort/docs/example-option-sort-append.html
diff --git a/static/js/tablesort/docs/example-option-sort-empty.html b/api/static/js/tablesort/docs/example-option-sort-empty.html
similarity index 100%
rename from static/js/tablesort/docs/example-option-sort-empty.html
rename to api/static/js/tablesort/docs/example-option-sort-empty.html
diff --git a/static/js/tablesort/docs/example-option-sort-force.html b/api/static/js/tablesort/docs/example-option-sort-force.html
similarity index 100%
rename from static/js/tablesort/docs/example-option-sort-force.html
rename to api/static/js/tablesort/docs/example-option-sort-force.html
diff --git a/static/js/tablesort/docs/example-option-sort-key.html b/api/static/js/tablesort/docs/example-option-sort-key.html
similarity index 100%
rename from static/js/tablesort/docs/example-option-sort-key.html
rename to api/static/js/tablesort/docs/example-option-sort-key.html
diff --git a/static/js/tablesort/docs/example-option-sort-list.html b/api/static/js/tablesort/docs/example-option-sort-list.html
similarity index 100%
rename from static/js/tablesort/docs/example-option-sort-list.html
rename to api/static/js/tablesort/docs/example-option-sort-list.html
diff --git a/static/js/tablesort/docs/example-option-sort-order.html b/api/static/js/tablesort/docs/example-option-sort-order.html
similarity index 100%
rename from static/js/tablesort/docs/example-option-sort-order.html
rename to api/static/js/tablesort/docs/example-option-sort-order.html
diff --git a/static/js/tablesort/docs/example-option-sortreset-sortrestart.html b/api/static/js/tablesort/docs/example-option-sortreset-sortrestart.html
similarity index 100%
rename from static/js/tablesort/docs/example-option-sortreset-sortrestart.html
rename to api/static/js/tablesort/docs/example-option-sortreset-sortrestart.html
diff --git a/static/js/tablesort/docs/example-option-text-extraction.html b/api/static/js/tablesort/docs/example-option-text-extraction.html
similarity index 100%
rename from static/js/tablesort/docs/example-option-text-extraction.html
rename to api/static/js/tablesort/docs/example-option-text-extraction.html
diff --git a/static/js/tablesort/docs/example-option-textsorter-semver.html b/api/static/js/tablesort/docs/example-option-textsorter-semver.html
similarity index 100%
rename from static/js/tablesort/docs/example-option-textsorter-semver.html
rename to api/static/js/tablesort/docs/example-option-textsorter-semver.html
diff --git a/static/js/tablesort/docs/example-option-theme-metro-style.html b/api/static/js/tablesort/docs/example-option-theme-metro-style.html
similarity index 100%
rename from static/js/tablesort/docs/example-option-theme-metro-style.html
rename to api/static/js/tablesort/docs/example-option-theme-metro-style.html
diff --git a/static/js/tablesort/docs/example-options-headers-digits-strings.html b/api/static/js/tablesort/docs/example-options-headers-digits-strings.html
similarity index 100%
rename from static/js/tablesort/docs/example-options-headers-digits-strings.html
rename to api/static/js/tablesort/docs/example-options-headers-digits-strings.html
diff --git a/static/js/tablesort/docs/example-options-headers-locked.html b/api/static/js/tablesort/docs/example-options-headers-locked.html
similarity index 100%
rename from static/js/tablesort/docs/example-options-headers-locked.html
rename to api/static/js/tablesort/docs/example-options-headers-locked.html
diff --git a/static/js/tablesort/docs/example-options-headers-order.html b/api/static/js/tablesort/docs/example-options-headers-order.html
similarity index 100%
rename from static/js/tablesort/docs/example-options-headers-order.html
rename to api/static/js/tablesort/docs/example-options-headers-order.html
diff --git a/static/js/tablesort/docs/example-options-headers-parser.html b/api/static/js/tablesort/docs/example-options-headers-parser.html
similarity index 100%
rename from static/js/tablesort/docs/example-options-headers-parser.html
rename to api/static/js/tablesort/docs/example-options-headers-parser.html
diff --git a/static/js/tablesort/docs/example-options-headers.html b/api/static/js/tablesort/docs/example-options-headers.html
similarity index 100%
rename from static/js/tablesort/docs/example-options-headers.html
rename to api/static/js/tablesort/docs/example-options-headers.html
diff --git a/static/js/tablesort/docs/example-pager-ajax.html b/api/static/js/tablesort/docs/example-pager-ajax.html
similarity index 100%
rename from static/js/tablesort/docs/example-pager-ajax.html
rename to api/static/js/tablesort/docs/example-pager-ajax.html
diff --git a/static/js/tablesort/docs/example-pager-filtered.html b/api/static/js/tablesort/docs/example-pager-filtered.html
similarity index 100%
rename from static/js/tablesort/docs/example-pager-filtered.html
rename to api/static/js/tablesort/docs/example-pager-filtered.html
diff --git a/static/js/tablesort/docs/example-pager.html b/api/static/js/tablesort/docs/example-pager.html
similarity index 100%
rename from static/js/tablesort/docs/example-pager.html
rename to api/static/js/tablesort/docs/example-pager.html
diff --git a/static/js/tablesort/docs/example-parsers-advanced.html b/api/static/js/tablesort/docs/example-parsers-advanced.html
similarity index 100%
rename from static/js/tablesort/docs/example-parsers-advanced.html
rename to api/static/js/tablesort/docs/example-parsers-advanced.html
diff --git a/static/js/tablesort/docs/example-parsers-class-name.html b/api/static/js/tablesort/docs/example-parsers-class-name.html
similarity index 100%
rename from static/js/tablesort/docs/example-parsers-class-name.html
rename to api/static/js/tablesort/docs/example-parsers-class-name.html
diff --git a/static/js/tablesort/docs/example-parsers-dates.html b/api/static/js/tablesort/docs/example-parsers-dates.html
similarity index 100%
rename from static/js/tablesort/docs/example-parsers-dates.html
rename to api/static/js/tablesort/docs/example-parsers-dates.html
diff --git a/static/js/tablesort/docs/example-parsers-duration.html b/api/static/js/tablesort/docs/example-parsers-duration.html
similarity index 100%
rename from static/js/tablesort/docs/example-parsers-duration.html
rename to api/static/js/tablesort/docs/example-parsers-duration.html
diff --git a/static/js/tablesort/docs/example-parsers-feet-inch-fraction.html b/api/static/js/tablesort/docs/example-parsers-feet-inch-fraction.html
similarity index 100%
rename from static/js/tablesort/docs/example-parsers-feet-inch-fraction.html
rename to api/static/js/tablesort/docs/example-parsers-feet-inch-fraction.html
diff --git a/static/js/tablesort/docs/example-parsers-file-type.html b/api/static/js/tablesort/docs/example-parsers-file-type.html
similarity index 100%
rename from static/js/tablesort/docs/example-parsers-file-type.html
rename to api/static/js/tablesort/docs/example-parsers-file-type.html
diff --git a/static/js/tablesort/docs/example-parsers-ignore-articles.html b/api/static/js/tablesort/docs/example-parsers-ignore-articles.html
similarity index 100%
rename from static/js/tablesort/docs/example-parsers-ignore-articles.html
rename to api/static/js/tablesort/docs/example-parsers-ignore-articles.html
diff --git a/static/js/tablesort/docs/example-parsers-ip-address.html b/api/static/js/tablesort/docs/example-parsers-ip-address.html
similarity index 100%
rename from static/js/tablesort/docs/example-parsers-ip-address.html
rename to api/static/js/tablesort/docs/example-parsers-ip-address.html
diff --git a/static/js/tablesort/docs/example-parsers-jquery-data.html b/api/static/js/tablesort/docs/example-parsers-jquery-data.html
similarity index 100%
rename from static/js/tablesort/docs/example-parsers-jquery-data.html
rename to api/static/js/tablesort/docs/example-parsers-jquery-data.html
diff --git a/static/js/tablesort/docs/example-parsers-metric.html b/api/static/js/tablesort/docs/example-parsers-metric.html
similarity index 100%
rename from static/js/tablesort/docs/example-parsers-metric.html
rename to api/static/js/tablesort/docs/example-parsers-metric.html
diff --git a/static/js/tablesort/docs/example-parsers-roman.html b/api/static/js/tablesort/docs/example-parsers-roman.html
similarity index 100%
rename from static/js/tablesort/docs/example-parsers-roman.html
rename to api/static/js/tablesort/docs/example-parsers-roman.html
diff --git a/static/js/tablesort/docs/example-parsers.html b/api/static/js/tablesort/docs/example-parsers.html
similarity index 100%
rename from static/js/tablesort/docs/example-parsers.html
rename to api/static/js/tablesort/docs/example-parsers.html
diff --git a/static/js/tablesort/docs/example-trigger-sort.html b/api/static/js/tablesort/docs/example-trigger-sort.html
similarity index 100%
rename from static/js/tablesort/docs/example-trigger-sort.html
rename to api/static/js/tablesort/docs/example-trigger-sort.html
diff --git a/static/js/tablesort/docs/example-triggers.html b/api/static/js/tablesort/docs/example-triggers.html
similarity index 100%
rename from static/js/tablesort/docs/example-triggers.html
rename to api/static/js/tablesort/docs/example-triggers.html
diff --git a/static/js/tablesort/docs/example-update-all.html b/api/static/js/tablesort/docs/example-update-all.html
similarity index 100%
rename from static/js/tablesort/docs/example-update-all.html
rename to api/static/js/tablesort/docs/example-update-all.html
diff --git a/static/js/tablesort/docs/example-update-cell.html b/api/static/js/tablesort/docs/example-update-cell.html
similarity index 100%
rename from static/js/tablesort/docs/example-update-cell.html
rename to api/static/js/tablesort/docs/example-update-cell.html
diff --git a/static/js/tablesort/docs/example-widget-align-character.html b/api/static/js/tablesort/docs/example-widget-align-character.html
similarity index 100%
rename from static/js/tablesort/docs/example-widget-align-character.html
rename to api/static/js/tablesort/docs/example-widget-align-character.html
diff --git a/static/js/tablesort/docs/example-widget-bootstrap-theme.html b/api/static/js/tablesort/docs/example-widget-bootstrap-theme.html
similarity index 100%
rename from static/js/tablesort/docs/example-widget-bootstrap-theme.html
rename to api/static/js/tablesort/docs/example-widget-bootstrap-theme.html
diff --git a/static/js/tablesort/docs/example-widget-build-table.html b/api/static/js/tablesort/docs/example-widget-build-table.html
similarity index 100%
rename from static/js/tablesort/docs/example-widget-build-table.html
rename to api/static/js/tablesort/docs/example-widget-build-table.html
diff --git a/static/js/tablesort/docs/example-widget-column-selector.html b/api/static/js/tablesort/docs/example-widget-column-selector.html
similarity index 100%
rename from static/js/tablesort/docs/example-widget-column-selector.html
rename to api/static/js/tablesort/docs/example-widget-column-selector.html
diff --git a/static/js/tablesort/docs/example-widget-columns.html b/api/static/js/tablesort/docs/example-widget-columns.html
similarity index 100%
rename from static/js/tablesort/docs/example-widget-columns.html
rename to api/static/js/tablesort/docs/example-widget-columns.html
diff --git a/static/js/tablesort/docs/example-widget-css-sticky-header.html b/api/static/js/tablesort/docs/example-widget-css-sticky-header.html
similarity index 100%
rename from static/js/tablesort/docs/example-widget-css-sticky-header.html
rename to api/static/js/tablesort/docs/example-widget-css-sticky-header.html
diff --git a/static/js/tablesort/docs/example-widget-editable.html b/api/static/js/tablesort/docs/example-widget-editable.html
similarity index 100%
rename from static/js/tablesort/docs/example-widget-editable.html
rename to api/static/js/tablesort/docs/example-widget-editable.html
diff --git a/static/js/tablesort/docs/example-widget-filter-any-match.html b/api/static/js/tablesort/docs/example-widget-filter-any-match.html
similarity index 100%
rename from static/js/tablesort/docs/example-widget-filter-any-match.html
rename to api/static/js/tablesort/docs/example-widget-filter-any-match.html
diff --git a/static/js/tablesort/docs/example-widget-filter-custom-search.html b/api/static/js/tablesort/docs/example-widget-filter-custom-search.html
similarity index 100%
rename from static/js/tablesort/docs/example-widget-filter-custom-search.html
rename to api/static/js/tablesort/docs/example-widget-filter-custom-search.html
diff --git a/static/js/tablesort/docs/example-widget-filter-custom.html b/api/static/js/tablesort/docs/example-widget-filter-custom.html
similarity index 100%
rename from static/js/tablesort/docs/example-widget-filter-custom.html
rename to api/static/js/tablesort/docs/example-widget-filter-custom.html
diff --git a/static/js/tablesort/docs/example-widget-filter-external-inputs.html b/api/static/js/tablesort/docs/example-widget-filter-external-inputs.html
similarity index 100%
rename from static/js/tablesort/docs/example-widget-filter-external-inputs.html
rename to api/static/js/tablesort/docs/example-widget-filter-external-inputs.html
diff --git a/static/js/tablesort/docs/example-widget-filter-formatter-1.html b/api/static/js/tablesort/docs/example-widget-filter-formatter-1.html
similarity index 100%
rename from static/js/tablesort/docs/example-widget-filter-formatter-1.html
rename to api/static/js/tablesort/docs/example-widget-filter-formatter-1.html
diff --git a/static/js/tablesort/docs/example-widget-filter-formatter-2.html b/api/static/js/tablesort/docs/example-widget-filter-formatter-2.html
similarity index 100%
rename from static/js/tablesort/docs/example-widget-filter-formatter-2.html
rename to api/static/js/tablesort/docs/example-widget-filter-formatter-2.html
diff --git a/static/js/tablesort/docs/example-widget-filter-formatter-select2.html b/api/static/js/tablesort/docs/example-widget-filter-formatter-select2.html
similarity index 100%
rename from static/js/tablesort/docs/example-widget-filter-formatter-select2.html
rename to api/static/js/tablesort/docs/example-widget-filter-formatter-select2.html
diff --git a/static/js/tablesort/docs/example-widget-filter.html b/api/static/js/tablesort/docs/example-widget-filter.html
similarity index 100%
rename from static/js/tablesort/docs/example-widget-filter.html
rename to api/static/js/tablesort/docs/example-widget-filter.html
diff --git a/static/js/tablesort/docs/example-widget-grouping-filter-childrows.html b/api/static/js/tablesort/docs/example-widget-grouping-filter-childrows.html
similarity index 100%
rename from static/js/tablesort/docs/example-widget-grouping-filter-childrows.html
rename to api/static/js/tablesort/docs/example-widget-grouping-filter-childrows.html
diff --git a/static/js/tablesort/docs/example-widget-grouping.html b/api/static/js/tablesort/docs/example-widget-grouping.html
similarity index 100%
rename from static/js/tablesort/docs/example-widget-grouping.html
rename to api/static/js/tablesort/docs/example-widget-grouping.html
diff --git a/static/js/tablesort/docs/example-widget-header-titles.html b/api/static/js/tablesort/docs/example-widget-header-titles.html
similarity index 100%
rename from static/js/tablesort/docs/example-widget-header-titles.html
rename to api/static/js/tablesort/docs/example-widget-header-titles.html
diff --git a/static/js/tablesort/docs/example-widget-math.html b/api/static/js/tablesort/docs/example-widget-math.html
similarity index 100%
rename from static/js/tablesort/docs/example-widget-math.html
rename to api/static/js/tablesort/docs/example-widget-math.html
diff --git a/static/js/tablesort/docs/example-widget-output.html b/api/static/js/tablesort/docs/example-widget-output.html
similarity index 100%
rename from static/js/tablesort/docs/example-widget-output.html
rename to api/static/js/tablesort/docs/example-widget-output.html
diff --git a/static/js/tablesort/docs/example-widget-pager-ajax.html b/api/static/js/tablesort/docs/example-widget-pager-ajax.html
similarity index 100%
rename from static/js/tablesort/docs/example-widget-pager-ajax.html
rename to api/static/js/tablesort/docs/example-widget-pager-ajax.html
diff --git a/static/js/tablesort/docs/example-widget-pager.html b/api/static/js/tablesort/docs/example-widget-pager.html
similarity index 100%
rename from static/js/tablesort/docs/example-widget-pager.html
rename to api/static/js/tablesort/docs/example-widget-pager.html
diff --git a/static/js/tablesort/docs/example-widget-print.html b/api/static/js/tablesort/docs/example-widget-print.html
similarity index 100%
rename from static/js/tablesort/docs/example-widget-print.html
rename to api/static/js/tablesort/docs/example-widget-print.html
diff --git a/static/js/tablesort/docs/example-widget-reflow.html b/api/static/js/tablesort/docs/example-widget-reflow.html
similarity index 100%
rename from static/js/tablesort/docs/example-widget-reflow.html
rename to api/static/js/tablesort/docs/example-widget-reflow.html
diff --git a/static/js/tablesort/docs/example-widget-reflow1.html b/api/static/js/tablesort/docs/example-widget-reflow1.html
similarity index 100%
rename from static/js/tablesort/docs/example-widget-reflow1.html
rename to api/static/js/tablesort/docs/example-widget-reflow1.html
diff --git a/static/js/tablesort/docs/example-widget-reflow2.html b/api/static/js/tablesort/docs/example-widget-reflow2.html
similarity index 100%
rename from static/js/tablesort/docs/example-widget-reflow2.html
rename to api/static/js/tablesort/docs/example-widget-reflow2.html
diff --git a/static/js/tablesort/docs/example-widget-reflow3.html b/api/static/js/tablesort/docs/example-widget-reflow3.html
similarity index 100%
rename from static/js/tablesort/docs/example-widget-reflow3.html
rename to api/static/js/tablesort/docs/example-widget-reflow3.html
diff --git a/static/js/tablesort/docs/example-widget-resizable.html b/api/static/js/tablesort/docs/example-widget-resizable.html
similarity index 100%
rename from static/js/tablesort/docs/example-widget-resizable.html
rename to api/static/js/tablesort/docs/example-widget-resizable.html
diff --git a/static/js/tablesort/docs/example-widget-savesort.html b/api/static/js/tablesort/docs/example-widget-savesort.html
similarity index 100%
rename from static/js/tablesort/docs/example-widget-savesort.html
rename to api/static/js/tablesort/docs/example-widget-savesort.html
diff --git a/static/js/tablesort/docs/example-widget-scroller.html b/api/static/js/tablesort/docs/example-widget-scroller.html
similarity index 100%
rename from static/js/tablesort/docs/example-widget-scroller.html
rename to api/static/js/tablesort/docs/example-widget-scroller.html
diff --git a/static/js/tablesort/docs/example-widget-static-row.html b/api/static/js/tablesort/docs/example-widget-static-row.html
similarity index 100%
rename from static/js/tablesort/docs/example-widget-static-row.html
rename to api/static/js/tablesort/docs/example-widget-static-row.html
diff --git a/static/js/tablesort/docs/example-widget-sticky-header.html b/api/static/js/tablesort/docs/example-widget-sticky-header.html
similarity index 100%
rename from static/js/tablesort/docs/example-widget-sticky-header.html
rename to api/static/js/tablesort/docs/example-widget-sticky-header.html
diff --git a/static/js/tablesort/docs/example-widget-ui-theme.html b/api/static/js/tablesort/docs/example-widget-ui-theme.html
similarity index 100%
rename from static/js/tablesort/docs/example-widget-ui-theme.html
rename to api/static/js/tablesort/docs/example-widget-ui-theme.html
diff --git a/static/js/tablesort/docs/example-widget-zebra.html b/api/static/js/tablesort/docs/example-widget-zebra.html
similarity index 100%
rename from static/js/tablesort/docs/example-widget-zebra.html
rename to api/static/js/tablesort/docs/example-widget-zebra.html
diff --git a/static/js/tablesort/docs/example-widgets.html b/api/static/js/tablesort/docs/example-widgets.html
similarity index 100%
rename from static/js/tablesort/docs/example-widgets.html
rename to api/static/js/tablesort/docs/example-widgets.html
diff --git a/static/js/tablesort/docs/fonts/glyphicons-halflings-regular.eot b/api/static/js/tablesort/docs/fonts/glyphicons-halflings-regular.eot
similarity index 100%
rename from static/js/tablesort/docs/fonts/glyphicons-halflings-regular.eot
rename to api/static/js/tablesort/docs/fonts/glyphicons-halflings-regular.eot
diff --git a/static/js/tablesort/docs/fonts/glyphicons-halflings-regular.svg b/api/static/js/tablesort/docs/fonts/glyphicons-halflings-regular.svg
similarity index 100%
rename from static/js/tablesort/docs/fonts/glyphicons-halflings-regular.svg
rename to api/static/js/tablesort/docs/fonts/glyphicons-halflings-regular.svg
diff --git a/static/js/tablesort/docs/fonts/glyphicons-halflings-regular.ttf b/api/static/js/tablesort/docs/fonts/glyphicons-halflings-regular.ttf
similarity index 100%
rename from static/js/tablesort/docs/fonts/glyphicons-halflings-regular.ttf
rename to api/static/js/tablesort/docs/fonts/glyphicons-halflings-regular.ttf
diff --git a/static/js/tablesort/docs/fonts/glyphicons-halflings-regular.woff b/api/static/js/tablesort/docs/fonts/glyphicons-halflings-regular.woff
similarity index 100%
rename from static/js/tablesort/docs/fonts/glyphicons-halflings-regular.woff
rename to api/static/js/tablesort/docs/fonts/glyphicons-halflings-regular.woff
diff --git a/static/js/tablesort/docs/img/external.png b/api/static/js/tablesort/docs/img/external.png
similarity index 100%
rename from static/js/tablesort/docs/img/external.png
rename to api/static/js/tablesort/docs/img/external.png
diff --git a/static/js/tablesort/docs/img/link.png b/api/static/js/tablesort/docs/img/link.png
similarity index 100%
rename from static/js/tablesort/docs/img/link.png
rename to api/static/js/tablesort/docs/img/link.png
diff --git a/static/js/tablesort/docs/img/screens-blue.png b/api/static/js/tablesort/docs/img/screens-blue.png
similarity index 100%
rename from static/js/tablesort/docs/img/screens-blue.png
rename to api/static/js/tablesort/docs/img/screens-blue.png
diff --git a/static/js/tablesort/docs/img/screens.png b/api/static/js/tablesort/docs/img/screens.png
similarity index 100%
rename from static/js/tablesort/docs/img/screens.png
rename to api/static/js/tablesort/docs/img/screens.png
diff --git a/static/js/tablesort/docs/index.html b/api/static/js/tablesort/docs/index.html
similarity index 100%
rename from static/js/tablesort/docs/index.html
rename to api/static/js/tablesort/docs/index.html
diff --git a/static/js/tablesort/docs/js/bootstrap.min.js b/api/static/js/tablesort/docs/js/bootstrap.min.js
similarity index 100%
rename from static/js/tablesort/docs/js/bootstrap.min.js
rename to api/static/js/tablesort/docs/js/bootstrap.min.js
diff --git a/static/js/tablesort/docs/js/chili/jquery.chili-2.2.js b/api/static/js/tablesort/docs/js/chili/jquery.chili-2.2.js
similarity index 100%
rename from static/js/tablesort/docs/js/chili/jquery.chili-2.2.js
rename to api/static/js/tablesort/docs/js/chili/jquery.chili-2.2.js
diff --git a/static/js/tablesort/docs/js/chili/recipes.js b/api/static/js/tablesort/docs/js/chili/recipes.js
similarity index 100%
rename from static/js/tablesort/docs/js/chili/recipes.js
rename to api/static/js/tablesort/docs/js/chili/recipes.js
diff --git a/static/js/tablesort/docs/js/demo-build-table.js b/api/static/js/tablesort/docs/js/demo-build-table.js
similarity index 100%
rename from static/js/tablesort/docs/js/demo-build-table.js
rename to api/static/js/tablesort/docs/js/demo-build-table.js
diff --git a/static/js/tablesort/docs/js/docs.js b/api/static/js/tablesort/docs/js/docs.js
similarity index 100%
rename from static/js/tablesort/docs/js/docs.js
rename to api/static/js/tablesort/docs/js/docs.js
diff --git a/static/js/tablesort/docs/js/jquery-1.2.6.min.js b/api/static/js/tablesort/docs/js/jquery-1.2.6.min.js
similarity index 100%
rename from static/js/tablesort/docs/js/jquery-1.2.6.min.js
rename to api/static/js/tablesort/docs/js/jquery-1.2.6.min.js
diff --git a/static/js/tablesort/docs/js/jquery-1.4.4.min.js b/api/static/js/tablesort/docs/js/jquery-1.4.4.min.js
similarity index 100%
rename from static/js/tablesort/docs/js/jquery-1.4.4.min.js
rename to api/static/js/tablesort/docs/js/jquery-1.4.4.min.js
diff --git a/static/js/tablesort/docs/js/jquery-latest.min.js b/api/static/js/tablesort/docs/js/jquery-latest.min.js
similarity index 100%
rename from static/js/tablesort/docs/js/jquery-latest.min.js
rename to api/static/js/tablesort/docs/js/jquery-latest.min.js
diff --git a/static/js/tablesort/docs/js/jquery-ui-latest.min.js b/api/static/js/tablesort/docs/js/jquery-ui-latest.min.js
similarity index 100%
rename from static/js/tablesort/docs/js/jquery-ui-latest.min.js
rename to api/static/js/tablesort/docs/js/jquery-ui-latest.min.js
diff --git a/static/js/tablesort/docs/js/jquery.jui_theme_switch.min.js b/api/static/js/tablesort/docs/js/jquery.jui_theme_switch.min.js
similarity index 100%
rename from static/js/tablesort/docs/js/jquery.jui_theme_switch.min.js
rename to api/static/js/tablesort/docs/js/jquery.jui_theme_switch.min.js
diff --git a/static/js/tablesort/docs/js/jquery.tipsy.min.js b/api/static/js/tablesort/docs/js/jquery.tipsy.min.js
similarity index 100%
rename from static/js/tablesort/docs/js/jquery.tipsy.min.js
rename to api/static/js/tablesort/docs/js/jquery.tipsy.min.js
diff --git a/static/js/tablesort/docs/js/prettify.js b/api/static/js/tablesort/docs/js/prettify.js
similarity index 100%
rename from static/js/tablesort/docs/js/prettify.js
rename to api/static/js/tablesort/docs/js/prettify.js
diff --git a/static/js/tablesort/docs/js/search-ie.js b/api/static/js/tablesort/docs/js/search-ie.js
similarity index 100%
rename from static/js/tablesort/docs/js/search-ie.js
rename to api/static/js/tablesort/docs/js/search-ie.js
diff --git a/static/js/tablesort/docs/js/search.js b/api/static/js/tablesort/docs/js/search.js
similarity index 100%
rename from static/js/tablesort/docs/js/search.js
rename to api/static/js/tablesort/docs/js/search.js
diff --git a/static/js/tablesort/docs/js/select2-3.4.6.min.js b/api/static/js/tablesort/docs/js/select2-3.4.6.min.js
similarity index 100%
rename from static/js/tablesort/docs/js/select2-3.4.6.min.js
rename to api/static/js/tablesort/docs/js/select2-3.4.6.min.js
diff --git a/static/js/tablesort/docs/js/sugar.min.js b/api/static/js/tablesort/docs/js/sugar.min.js
similarity index 100%
rename from static/js/tablesort/docs/js/sugar.min.js
rename to api/static/js/tablesort/docs/js/sugar.min.js
diff --git a/static/js/tablesort/docs/themes.html b/api/static/js/tablesort/docs/themes.html
similarity index 100%
rename from static/js/tablesort/docs/themes.html
rename to api/static/js/tablesort/docs/themes.html
diff --git a/static/js/tablesort/index.html b/api/static/js/tablesort/index.html
similarity index 100%
rename from static/js/tablesort/index.html
rename to api/static/js/tablesort/index.html
diff --git a/static/js/tablesort/js/extras/jquery.quicksearch.js b/api/static/js/tablesort/js/extras/jquery.quicksearch.js
similarity index 100%
rename from static/js/tablesort/js/extras/jquery.quicksearch.js
rename to api/static/js/tablesort/js/extras/jquery.quicksearch.js
diff --git a/static/js/tablesort/js/extras/semver-mod.js b/api/static/js/tablesort/js/extras/semver-mod.js
similarity index 100%
rename from static/js/tablesort/js/extras/semver-mod.js
rename to api/static/js/tablesort/js/extras/semver-mod.js
diff --git a/static/js/tablesort/js/extras/semver.js b/api/static/js/tablesort/js/extras/semver.js
similarity index 100%
rename from static/js/tablesort/js/extras/semver.js
rename to api/static/js/tablesort/js/extras/semver.js
diff --git a/static/js/tablesort/js/jquery.metadata.js b/api/static/js/tablesort/js/jquery.metadata.js
similarity index 100%
rename from static/js/tablesort/js/jquery.metadata.js
rename to api/static/js/tablesort/js/jquery.metadata.js
diff --git a/static/js/tablesort/js/jquery.tablesorter.js b/api/static/js/tablesort/js/jquery.tablesorter.js
similarity index 100%
rename from static/js/tablesort/js/jquery.tablesorter.js
rename to api/static/js/tablesort/js/jquery.tablesorter.js
diff --git a/static/js/tablesort/js/jquery.tablesorter.min.js b/api/static/js/tablesort/js/jquery.tablesorter.min.js
similarity index 100%
rename from static/js/tablesort/js/jquery.tablesorter.min.js
rename to api/static/js/tablesort/js/jquery.tablesorter.min.js
diff --git a/static/js/tablesort/js/jquery.tablesorter.widgets-filter-formatter-select2.js b/api/static/js/tablesort/js/jquery.tablesorter.widgets-filter-formatter-select2.js
similarity index 100%
rename from static/js/tablesort/js/jquery.tablesorter.widgets-filter-formatter-select2.js
rename to api/static/js/tablesort/js/jquery.tablesorter.widgets-filter-formatter-select2.js
diff --git a/static/js/tablesort/js/jquery.tablesorter.widgets-filter-formatter.js b/api/static/js/tablesort/js/jquery.tablesorter.widgets-filter-formatter.js
similarity index 100%
rename from static/js/tablesort/js/jquery.tablesorter.widgets-filter-formatter.js
rename to api/static/js/tablesort/js/jquery.tablesorter.widgets-filter-formatter.js
diff --git a/static/js/tablesort/js/jquery.tablesorter.widgets-filter-formatter.min.js b/api/static/js/tablesort/js/jquery.tablesorter.widgets-filter-formatter.min.js
similarity index 100%
rename from static/js/tablesort/js/jquery.tablesorter.widgets-filter-formatter.min.js
rename to api/static/js/tablesort/js/jquery.tablesorter.widgets-filter-formatter.min.js
diff --git a/static/js/tablesort/js/jquery.tablesorter.widgets.js b/api/static/js/tablesort/js/jquery.tablesorter.widgets.js
similarity index 100%
rename from static/js/tablesort/js/jquery.tablesorter.widgets.js
rename to api/static/js/tablesort/js/jquery.tablesorter.widgets.js
diff --git a/static/js/tablesort/js/jquery.tablesorter.widgets.min.js b/api/static/js/tablesort/js/jquery.tablesorter.widgets.min.js
similarity index 100%
rename from static/js/tablesort/js/jquery.tablesorter.widgets.min.js
rename to api/static/js/tablesort/js/jquery.tablesorter.widgets.min.js
diff --git a/static/js/tablesort/js/parsers/parser-date-extract.js b/api/static/js/tablesort/js/parsers/parser-date-extract.js
similarity index 100%
rename from static/js/tablesort/js/parsers/parser-date-extract.js
rename to api/static/js/tablesort/js/parsers/parser-date-extract.js
diff --git a/static/js/tablesort/js/parsers/parser-date-iso8601.js b/api/static/js/tablesort/js/parsers/parser-date-iso8601.js
similarity index 100%
rename from static/js/tablesort/js/parsers/parser-date-iso8601.js
rename to api/static/js/tablesort/js/parsers/parser-date-iso8601.js
diff --git a/static/js/tablesort/js/parsers/parser-date-month.js b/api/static/js/tablesort/js/parsers/parser-date-month.js
similarity index 100%
rename from static/js/tablesort/js/parsers/parser-date-month.js
rename to api/static/js/tablesort/js/parsers/parser-date-month.js
diff --git a/static/js/tablesort/js/parsers/parser-date-two-digit-year.js b/api/static/js/tablesort/js/parsers/parser-date-two-digit-year.js
similarity index 100%
rename from static/js/tablesort/js/parsers/parser-date-two-digit-year.js
rename to api/static/js/tablesort/js/parsers/parser-date-two-digit-year.js
diff --git a/static/js/tablesort/js/parsers/parser-date-weekday.js b/api/static/js/tablesort/js/parsers/parser-date-weekday.js
similarity index 100%
rename from static/js/tablesort/js/parsers/parser-date-weekday.js
rename to api/static/js/tablesort/js/parsers/parser-date-weekday.js
diff --git a/static/js/tablesort/js/parsers/parser-date.js b/api/static/js/tablesort/js/parsers/parser-date.js
similarity index 100%
rename from static/js/tablesort/js/parsers/parser-date.js
rename to api/static/js/tablesort/js/parsers/parser-date.js
diff --git a/static/js/tablesort/js/parsers/parser-duration.js b/api/static/js/tablesort/js/parsers/parser-duration.js
similarity index 100%
rename from static/js/tablesort/js/parsers/parser-duration.js
rename to api/static/js/tablesort/js/parsers/parser-duration.js
diff --git a/static/js/tablesort/js/parsers/parser-feet-inch-fraction.js b/api/static/js/tablesort/js/parsers/parser-feet-inch-fraction.js
similarity index 100%
rename from static/js/tablesort/js/parsers/parser-feet-inch-fraction.js
rename to api/static/js/tablesort/js/parsers/parser-feet-inch-fraction.js
diff --git a/static/js/tablesort/js/parsers/parser-file-type.js b/api/static/js/tablesort/js/parsers/parser-file-type.js
similarity index 100%
rename from static/js/tablesort/js/parsers/parser-file-type.js
rename to api/static/js/tablesort/js/parsers/parser-file-type.js
diff --git a/static/js/tablesort/js/parsers/parser-ignore-articles.js b/api/static/js/tablesort/js/parsers/parser-ignore-articles.js
similarity index 100%
rename from static/js/tablesort/js/parsers/parser-ignore-articles.js
rename to api/static/js/tablesort/js/parsers/parser-ignore-articles.js
diff --git a/static/js/tablesort/js/parsers/parser-image.js b/api/static/js/tablesort/js/parsers/parser-image.js
similarity index 100%
rename from static/js/tablesort/js/parsers/parser-image.js
rename to api/static/js/tablesort/js/parsers/parser-image.js
diff --git a/static/js/tablesort/js/parsers/parser-input-select.js b/api/static/js/tablesort/js/parsers/parser-input-select.js
similarity index 100%
rename from static/js/tablesort/js/parsers/parser-input-select.js
rename to api/static/js/tablesort/js/parsers/parser-input-select.js
diff --git a/static/js/tablesort/js/parsers/parser-ipv6.js b/api/static/js/tablesort/js/parsers/parser-ipv6.js
similarity index 100%
rename from static/js/tablesort/js/parsers/parser-ipv6.js
rename to api/static/js/tablesort/js/parsers/parser-ipv6.js
diff --git a/static/js/tablesort/js/parsers/parser-metric.js b/api/static/js/tablesort/js/parsers/parser-metric.js
similarity index 100%
rename from static/js/tablesort/js/parsers/parser-metric.js
rename to api/static/js/tablesort/js/parsers/parser-metric.js
diff --git a/static/js/tablesort/js/parsers/parser-roman.js b/api/static/js/tablesort/js/parsers/parser-roman.js
similarity index 100%
rename from static/js/tablesort/js/parsers/parser-roman.js
rename to api/static/js/tablesort/js/parsers/parser-roman.js
diff --git a/static/js/tablesort/js/widgets/widget-alignChar.js b/api/static/js/tablesort/js/widgets/widget-alignChar.js
similarity index 100%
rename from static/js/tablesort/js/widgets/widget-alignChar.js
rename to api/static/js/tablesort/js/widgets/widget-alignChar.js
diff --git a/static/js/tablesort/js/widgets/widget-build-table.js b/api/static/js/tablesort/js/widgets/widget-build-table.js
similarity index 100%
rename from static/js/tablesort/js/widgets/widget-build-table.js
rename to api/static/js/tablesort/js/widgets/widget-build-table.js
diff --git a/static/js/tablesort/js/widgets/widget-columnSelector.js b/api/static/js/tablesort/js/widgets/widget-columnSelector.js
similarity index 100%
rename from static/js/tablesort/js/widgets/widget-columnSelector.js
rename to api/static/js/tablesort/js/widgets/widget-columnSelector.js
diff --git a/static/js/tablesort/js/widgets/widget-cssStickyHeaders.js b/api/static/js/tablesort/js/widgets/widget-cssStickyHeaders.js
similarity index 100%
rename from static/js/tablesort/js/widgets/widget-cssStickyHeaders.js
rename to api/static/js/tablesort/js/widgets/widget-cssStickyHeaders.js
diff --git a/static/js/tablesort/js/widgets/widget-editable.js b/api/static/js/tablesort/js/widgets/widget-editable.js
similarity index 100%
rename from static/js/tablesort/js/widgets/widget-editable.js
rename to api/static/js/tablesort/js/widgets/widget-editable.js
diff --git a/static/js/tablesort/js/widgets/widget-grouping.js b/api/static/js/tablesort/js/widgets/widget-grouping.js
similarity index 100%
rename from static/js/tablesort/js/widgets/widget-grouping.js
rename to api/static/js/tablesort/js/widgets/widget-grouping.js
diff --git a/static/js/tablesort/js/widgets/widget-headerTitles.js b/api/static/js/tablesort/js/widgets/widget-headerTitles.js
similarity index 100%
rename from static/js/tablesort/js/widgets/widget-headerTitles.js
rename to api/static/js/tablesort/js/widgets/widget-headerTitles.js
diff --git a/static/js/tablesort/js/widgets/widget-math.js b/api/static/js/tablesort/js/widgets/widget-math.js
similarity index 100%
rename from static/js/tablesort/js/widgets/widget-math.js
rename to api/static/js/tablesort/js/widgets/widget-math.js
diff --git a/static/js/tablesort/js/widgets/widget-output.js b/api/static/js/tablesort/js/widgets/widget-output.js
similarity index 100%
rename from static/js/tablesort/js/widgets/widget-output.js
rename to api/static/js/tablesort/js/widgets/widget-output.js
diff --git a/static/js/tablesort/js/widgets/widget-pager.js b/api/static/js/tablesort/js/widgets/widget-pager.js
similarity index 100%
rename from static/js/tablesort/js/widgets/widget-pager.js
rename to api/static/js/tablesort/js/widgets/widget-pager.js
diff --git a/static/js/tablesort/js/widgets/widget-print.js b/api/static/js/tablesort/js/widgets/widget-print.js
similarity index 100%
rename from static/js/tablesort/js/widgets/widget-print.js
rename to api/static/js/tablesort/js/widgets/widget-print.js
diff --git a/static/js/tablesort/js/widgets/widget-reflow.js b/api/static/js/tablesort/js/widgets/widget-reflow.js
similarity index 100%
rename from static/js/tablesort/js/widgets/widget-reflow.js
rename to api/static/js/tablesort/js/widgets/widget-reflow.js
diff --git a/static/js/tablesort/js/widgets/widget-repeatheaders.js b/api/static/js/tablesort/js/widgets/widget-repeatheaders.js
similarity index 100%
rename from static/js/tablesort/js/widgets/widget-repeatheaders.js
rename to api/static/js/tablesort/js/widgets/widget-repeatheaders.js
diff --git a/static/js/tablesort/js/widgets/widget-scroller.js b/api/static/js/tablesort/js/widgets/widget-scroller.js
similarity index 100%
rename from static/js/tablesort/js/widgets/widget-scroller.js
rename to api/static/js/tablesort/js/widgets/widget-scroller.js
diff --git a/static/js/tablesort/js/widgets/widget-staticRow.js b/api/static/js/tablesort/js/widgets/widget-staticRow.js
similarity index 100%
rename from static/js/tablesort/js/widgets/widget-staticRow.js
rename to api/static/js/tablesort/js/widgets/widget-staticRow.js
diff --git a/static/js/tablesort/package.json b/api/static/js/tablesort/package.json
similarity index 100%
rename from static/js/tablesort/package.json
rename to api/static/js/tablesort/package.json
diff --git a/static/js/tablesort/tablesorter.jquery.json b/api/static/js/tablesort/tablesorter.jquery.json
similarity index 100%
rename from static/js/tablesort/tablesorter.jquery.json
rename to api/static/js/tablesort/tablesorter.jquery.json
diff --git a/static/js/tablesort/test.html b/api/static/js/tablesort/test.html
similarity index 100%
rename from static/js/tablesort/test.html
rename to api/static/js/tablesort/test.html
diff --git a/static/js/tablesort/testing/jshint-2.4.4.js b/api/static/js/tablesort/testing/jshint-2.4.4.js
similarity index 100%
rename from static/js/tablesort/testing/jshint-2.4.4.js
rename to api/static/js/tablesort/testing/jshint-2.4.4.js
diff --git a/static/js/tablesort/testing/qunit-1.14.0.css b/api/static/js/tablesort/testing/qunit-1.14.0.css
similarity index 100%
rename from static/js/tablesort/testing/qunit-1.14.0.css
rename to api/static/js/tablesort/testing/qunit-1.14.0.css
diff --git a/static/js/tablesort/testing/qunit-1.14.0.js b/api/static/js/tablesort/testing/qunit-1.14.0.js
similarity index 100%
rename from static/js/tablesort/testing/qunit-1.14.0.js
rename to api/static/js/tablesort/testing/qunit-1.14.0.js
diff --git a/static/js/tablesort/testing/testing-ipv6.js b/api/static/js/tablesort/testing/testing-ipv6.js
similarity index 100%
rename from static/js/tablesort/testing/testing-ipv6.js
rename to api/static/js/tablesort/testing/testing-ipv6.js
diff --git a/static/js/tablesort/testing/testing-widgets.js b/api/static/js/tablesort/testing/testing-widgets.js
similarity index 100%
rename from static/js/tablesort/testing/testing-widgets.js
rename to api/static/js/tablesort/testing/testing-widgets.js
diff --git a/static/js/tablesort/testing/testing.css b/api/static/js/tablesort/testing/testing.css
similarity index 100%
rename from static/js/tablesort/testing/testing.css
rename to api/static/js/tablesort/testing/testing.css
diff --git a/static/js/tablesort/testing/testing.js b/api/static/js/tablesort/testing/testing.js
similarity index 100%
rename from static/js/tablesort/testing/testing.js
rename to api/static/js/tablesort/testing/testing.js
diff --git a/static/js/twitter.js b/api/static/js/twitter.js
similarity index 100%
rename from static/js/twitter.js
rename to api/static/js/twitter.js
diff --git a/api/tasks.py b/api/tasks.py
new file mode 100644
index 0000000..b3a5f3e
--- /dev/null
+++ b/api/tasks.py
@@ -0,0 +1,67 @@
+__author__ = 'jcranwellward'
+
+import os
+
+# from celery import Celery
+# from celery.schedules import crontab
+#
+from manage import app, import_ai # , update_sites
+
+#
+# CELERYBEAT_SCHEDULE = {
+# # Executes import every 4 hours
+# 'import-ai-everyday': {
+# 'task': 'tasks.run_import',
+# 'schedule': crontab(hour='*/4'),
+# },
+# }
+#
+#
+# def make_celery(app):
+# celery = Celery(app.import_name, broker=app.config['CELERY_BROKER_URL'])
+# celery.conf.update(app.config)
+# celery.conf.CELERYBEAT_SCHEDULE = CELERYBEAT_SCHEDULE
+# TaskBase = celery.Task
+# class ContextTask(TaskBase):
+# abstract = True
+# def __call__(self, *args, **kwargs):
+# with app.app_context():
+# return TaskBase.__call__(self, *args, **kwargs)
+# celery.Task = ContextTask
+# return celery
+
+
+# celery = make_celery(app)
+
+
+# @celery.task
+def run_import():
+
+ dbs = os.environ.get('AI_DBS')
+ username = os.environ.get('AI_USERNAME')
+ password = os.environ.get('AI_PASSWORD')
+
+ if dbs:
+ print 'DB: {0}'.format(dbs)
+ import_ai(dbs, username, password)
+
+if __name__ == "__main__":
+ run_import()
+
+# @celery.task
+# def run_sites_update(
+# api_key,
+# domain,
+# table_name,
+# site_type,
+# name_col,
+# code_col,
+# target_list):
+#
+# update_sites(api_key=api_key,
+# domain=domain,
+# list_name=table_name,
+# site_type=site_type,
+# name_col=name_col,
+# code_col=code_col,
+# target_list=target_list)
diff --git a/templates/admin/index.html b/api/templates/admin/index.html
similarity index 100%
rename from templates/admin/index.html
rename to api/templates/admin/index.html
diff --git a/templates/list.html b/api/templates/list.html
similarity index 100%
rename from templates/list.html
rename to api/templates/list.html
diff --git a/templates/my_master.html b/api/templates/my_master.html
similarity index 100%
rename from templates/my_master.html
rename to api/templates/my_master.html
diff --git a/templates/spongemap.html b/api/templates/spongemap.html
similarity index 97%
rename from templates/spongemap.html
rename to api/templates/spongemap.html
index 0c42fcd..824f207 100644
--- a/templates/spongemap.html
+++ b/api/templates/spongemap.html
@@ -7,9 +7,9 @@
-
+ -->
-
+
@@ -34,20 +34,20 @@
@@ -59,7 +59,7 @@