taskapp/utilities/request.py
changeset 132 ca88bf4ad362
parent 122 daee11bdfbaa
child 133 34187a80d279
equal deleted inserted replaced
131:85276c5aee5c 132:ca88bf4ad362
     4 from pytask.taskapp.models import Request, Profile
     4 from pytask.taskapp.models import Request, Profile
     5 
     5 
     6 def create_request(sent_by,role,sent_to=None,task=None,receiving_user=None,pynts=0):
     6 def create_request(sent_by,role,sent_to=None,task=None,receiving_user=None,pynts=0):
     7     """
     7     """
     8     creates an unreplied request, based on the passed arguments
     8     creates an unreplied request, based on the passed arguments
     9         sent_to - a list of users to which the notification is to be sent
     9         sent_to - a list of users to which the request is to be sent
    10         sent_by - sender of request
    10         sent_by - sender of request
    11         role - a two character field which represents the role requested, if role = 'PY' then sent to all admins
    11         role - a two character field which represents the role requested, if role = 'PY' then sent to all admins
    12         task - a requesting task (useful for sending admins a request to give Pynts to the user)
    12         task - a requesting task (useful for sending admins a request to give Pynts to the user)
    13         receiving_user - user to whom the Pynts is assigned to(useful for sending admins a request to give Pynts to the user)
    13         receiving_user - user to whom the Pynts is assigned to(useful for sending admins a request to give Pynts to the user)
    14         pynts - the pynts assigned to the receiving user
    14         pynts - the pynts assigned to the receiving user