Let's say I have a function with one / two option but what if I want to add more later on and more more? Is there a way to make it work without much hassle?
def json_response_message(status, message, option=(), option1=()):
data = {
'status': status,
'message': message,
}
data.update(option)
data.update(option1)
return JsonResponse(data)
so I can use it like:
json_response_message(True, 'Hello', {'option': option})