想知道django如何能有两个用户表。教师表和学生表,都要实现登录。如果可以,登录的时候应该怎么写,一定要重写auth?
光阴似箭催人老,日月如移越少年。
There is no need to use two tables. Add a field to the user table to identify whether the user is a teacher or a student. When logging in, just check this field.
There is no need to use two tables. Add a field to the user table to identify whether the user is a teacher or a student.
When logging in, just check this field.