예제 #1
0
파일: models.py 프로젝트: kotenev/taska
def __generate_requestresponse_hash(sender, instance, created, *args,
                                    **kwargs):
    '''This method uses the post_save signal to automatically generate unique public hashes to be used when referencing an request response.
    '''
    if created:
        instance.hash = createHash(instance.id)
        instance.save()
예제 #2
0
파일: models.py 프로젝트: kotenev/taska
def __generate_result_hash(sender, instance, created, *args, **kwargs):
    '''This method uses the post_save signal to automatically generate unique public hashes to be used when referencing an result.
    '''
    if not isinstance(instance, Result):
        return

    if created:
        instance.hash = createHash(instance.id)
        instance.ttype = instance.type()
        instance.save()