从数据库django获取数据时出现问题
我面临一个大问题。我使用此查询是为了从数据库中获取数据:从数据库django获取数据时出现问题,django,database,postgresql,authentication,Django,Database,Postgresql,Authentication,我面临一个大问题。我使用此查询是为了从数据库中获取数据: try : user = UserModel.objects.get(subject_dn=subject_dn,issuer_dn=issuer_dn) except Exception : raise exceptions.NotFound(' User corresponding to the entred Certificate is not found in th
try :
user = UserModel.objects.get(subject_dn=subject_dn,issuer_dn=issuer_dn)
except Exception :
raise exceptions.NotFound(' User corresponding to the entred Certificate is not found in the System')
logger.info('this is the found user %s' %user)
问题是,即使我在数据库中有用户:我总是找不到用户。。。有人能给我解释一下为什么会这样吗
谢谢是您的型号的名称
UserModel
?你能分享你的模型吗