code: def send_invitation(request, project_id=None):
      
  
      project = None
      if project_id is not None:
          project = get_object_or_404(Project, id=project_id)
  
      if project is None:
  
          if not is_admin(request):
              return HttpResponseForbidden('<h1>Access Denied</h1>')
  
      else:
  
          if not project.can_edit(request):
              return HttpResponseForbidden('<h1>Access Denied</h1>')
  
      return _send_invitation(request, project)
docs: The logged in project leader wants to invite somebody to their project.