I\'m building a student management system using Django.
In this code, The user search for a student with the encrypted query
name=StudentName&grade=Grade&
Do not think views, think code
def _student_profile(*arg_data, **kwarg_data):
context = do(arg_data, kwarg_data)
return render("my_template", context)
def student_profile(request, name=None, grade=None, student_id=None):
data = do_things(request)
data.update({"name": name, "grade": grade, "student_id": student_id})
return _student_profile(**data)
def process_query(request):
data = do_other_things(request)
return _student_profile(**data)