예제 #1
0
파일: admin.py 프로젝트: kotenev/taska
def ptasklink(obj):
    ''' Custom AdminModel field that displays a link to the django-admin change page for an certain ProcessTask instance.

    Args:
        :obj (ProcessTask): An :class:`process.models.ProcessTask` instance to create the actor link to
    '''
    return reverse_link(obj, name=obj.task)
예제 #2
0
파일: admin.py 프로젝트: kotenev/taska
def prequest(obj):
    ''' Custom AdminModel field that displays a link to the django-admin change page for an certain task from a ProcessTaskUser instance.

    Args:
        :obj (ProcessTaskUser): An :class:`process.models.ProcessTaskUser` instance to create the actor link to
    '''
    return reverse_link(obj, name='Requests')
예제 #3
0
def object_link(obj):
    ''' Custom AdminModel field that displays a link to the django-admin change page for the generic object from a History instance.

    Args:
        :obj (Model): An :class:`django.db.models.Model` instance to create the change page to
    '''
    return reverse_link(obj.object)
예제 #4
0
def actor_link(obj):
    ''' Custom AdminModel field that displays a link to the django-admin change page for an certain actor from a History instance.

    Args:
        :obj (History): An :class:`history.models.History` instance to create the actor link to
    '''
    return reverse_link(obj.actor)
예제 #5
0
def sender_link(obj):
    ''' Custom AdminModel field that displays a link to the django-admin change page for an certain actor from a Message instance.

    Args:
        :obj (Message): An :class:`messagesystem.models.Message` instance to create the sender link to
    '''
    return reverse_link(obj.sender)