コード例 #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)