向同一个模型的外键反向关联名称产生了冲突 一个模型中有两个外键指向同一张表时,创建迁移模型时报错:" HINT: Add or change a related_name argument to the definition for 'AnswersModel.author' or 'AnswersModel.relay_to'."解决方案 class AnswersModel(models.Model): author = models.ForeignKey(FrontUserMod…
使用默认User表.默认显示用户username,转换成get_full_name() /home/labsmith/venv_labsmit/lib/python3.6/site-packages/django/contrib/auth/models.py class User(AbstractUser): """ Users within the Django authentication system are represented by this model. Use…