We cannot use request.user.student in case the user logs in for the first time and does not yet have a student object. On the other hand , doing get_or_create every time is annoying. Maybe the middleware or the backend can make sure that the student is created on time? After all, if we log in we need to create the student already.
We cannot use request.user.student in case the user logs in for the first time and does not yet have a student object. On the other hand , doing get_or_create every time is annoying. Maybe the middleware or the backend can make sure that the student is created on time? After all, if we log in we need to create the student already.