from django.conf import settings
from django.contrib.auth import get_user_model
from django.contrib.auth.models import Group
from django.contrib.contenttypes.models import ContentType
from django.core.exceptions import ObjectDoesNotExist
from django.db.models import signals


def post_save_user(instance, raw, created, **kwargs):
    if created:
        try:
            owner = instance
        except ObjectDoesNotExist:
            User = get_user_model()
            owner = User(instance)
            owner.save() 
    
signals.post_save.connect(post_save_user, settings.AUTH_USER_MODEL) 
        
def test_ldt():
    if 'ldt.ldt_utils' in settings.INSTALLED_APPS:
        return True
    else:
        return False

def get_content_type_list() :
    content_type_list = []
    return content_type_list


