search

Home  >  Q&A  >  body text

python - django如何创建两个用户表?

想知道django如何能有两个用户表。
教师表和学生表,都要实现登录。
如果可以,登录的时候应该怎么写,一定要重写auth?

大家讲道理大家讲道理2897 days ago325

reply all(1)I'll reply

  • 伊谢尔伦

    伊谢尔伦2017-04-18 09:48:45

    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.

    reply
    0
  • Cancelreply