Open mZneit opened 2 years ago
We know that a new categorizer hasn't logged in before if they are in the categorizers Django but do not have a row in the categorizers table. At that point, complete the rest of the table by asking them for their name and initials. Doing it this way, we don't need to trigger any row insertion. As soon as they login for the first time, ask them right away for the info you need (name and initials) and immediately create the row in the categorizers table.
Test case: Mess with the URL. Instead of filling out the categorizer form, go to the main page and try to make a categorization. This should fail because there is no foreign key into the categorizers table to insert the categorization.
Use a form for categorizers. See https://docs.djangoproject.com/en/3.2/topics/forms/
https://github.com/ponder-lab/Imperative-DL-Study-Web-App/issues/100#issuecomment-949769381