# Path: rest_framework_tus/models.py
# def get_upload_model():
#     """
#     Returns the User model that is active in this project.
#     """
#     from django.apps import apps as django_apps
#     from .settings import TUS_UPLOAD_MODEL
#     try:
#         return django_apps.get_model(TUS_UPLOAD_MODEL)
#     except ValueError:
#         raise ImproperlyConfigured('UPLOAD_MODEL must be of the form \'app_label.model_name\'')
#     except LookupError:
#         raise ImproperlyConfigured('UPLOAD_MODEL refers to model \'%s\' that has not been installed' % TUS_UPLOAD_MODEL)
# 
# Path: rest_framework_tus/signals.py

# 
# Path: rest_framework_tus/storage.py
# def get_save_handler(import_path=None):
#     return import_string(import_path or TUS_SAVE_HANDLER_CLASS)


import logging
from django.dispatch import receiver
from rest_framework_tus.models import get_upload_model
from rest_framework_tus.signals import received, saved, finished
from rest_framework_tus.storage import get_save_handler
# -*- coding: utf-8 -*-
from __future__ import unicode_literals




logger = logging.getLogger(__name__)


@receiver(received, sender=get_upload_model())
def on_receiving_done(sender, instance, **kwargs):
    logger.debug('on_receiving_done: {}'.format(instance))

# Path: rest_framework_tus/models.py
# def get_upload_model():
#     """
#     Returns the User model that is active in this project.
#     """
#     from django.apps import apps as django_apps
#     from .settings import TUS_UPLOAD_MODEL
#     try:
#         return django_apps.get_model(TUS_UPLOAD_MODEL)
#     except ValueError:
#         raise ImproperlyConfigured('UPLOAD_MODEL must be of the form \'app_label.model_name\'')
#     except LookupError:
#         raise ImproperlyConfigured('UPLOAD_MODEL refers to model \'%s\' that has not been installed' % TUS_UPLOAD_MODEL)
# 
# Path: rest_framework_tus/signals.py

# 
# Path: rest_framework_tus/storage.py
# def get_save_handler(import_path=None):
#     return import_string(import_path or TUS_SAVE_HANDLER_CLASS)


# Path: rest_framework_tus/receivers.py
import logging
from django.dispatch import receiver
from rest_framework_tus.models import get_upload_model
from rest_framework_tus.signals import received, saved, finished
from rest_framework_tus.storage import get_save_handler

# -*- coding: utf-8 -*-
from __future__ import unicode_literals




logger = logging.getLogger(__name__)


@receiver(received, sender=get_upload_model())
def on_receiving_done(sender, instance, **kwargs):
    logger.debug('on_receiving_done: {}'.format(instance))

    save_handler = get_save_handler()