swsnu / swppfall2021

Learning Software Engineering By Building Web Services
28 stars 19 forks source link

Practice session 7 task #101

Open mieseung opened 3 years ago

mieseung commented 3 years ago

I have a question about practice session 7 tasks.

Should the age value in response be string even though age is IntegerField?

I have already asked the reason why the JsonResponse makes the integer value into string and got some answer, but I cannot fully understand it. Do we need to change all the age value into string? Then, why should the value of age field be string?

ttoru96 commented 3 years ago

I'm afraid that my explanation was not clear enough last time.

  1. Why should the value of age field be string? It is design choice. For this week's practice session task, please follow the format specified at slide.

  2. Do we need to change all the age value into string? Yes, please do so. In order to change all the age value into string, you will need to change some part of view function for GET method as well.

mieseung commented 3 years ago

Thanks a lot ! I think I totally understand it. :)