Consuming parameters passed to your handlers
It’s nice to be able to show content, but it’s better to show content as a result of user input. This recipe will demonstrate the different ways to receive this input and react to it. As in the previous recipes, we’ll make use of the hostel.student
model.
How to do it...
First, we’ll add a route that expects a traditional parameter with a student’s ID to show some details about them. Then, we’ll do the same again, but we’ll incorporate our parameter into the path itself:
- Add a path that expects a student’s ID as a parameter, as shown in the following example:
        @http.route('/my_hostel/student_details', type='http', auth='none')         def student_details(self, student_id):               ...