#!/usr/bin/env python

from itertools import chain
from urllib import unquote

from django.conf import settings
from django.db import models
from django.utils.timezone import now 

from panda import solr, utils
from panda.exceptions import DataImportError, DatasetLockedError
from panda.fields import JSONField
from panda.models.category import Category
from panda.models.slugged_model import SluggedModel
from panda.models.task_status import TaskStatus
from panda.models.user_proxy import UserProxy
from panda.tasks import get_import_task_type_for_upload, ExportCSVTask, PurgeDataTask, ReindexTask 
from panda.utils.column_schema import make_column_schema, update_indexed_names