Django has following build in class:
@python_2_unicode_compatible
class ResetPasswordToken(models.Model):
I'm writing a test and want to check if there is a reset password token in db for a specific user. So I do:
token = ResetPasswordToken.objects.filter().all()
Hower python has problems with this:
Unable to get repr for <class 'django.db.models.query.QuerySet'>
I think this is because I am using python 3 and above the model there is a '@python_2_unicode_compatible'
?
How can I do this correctly? Thanks
question from:
https://stackoverflow.com/questions/65560163/unable-to-get-repr-for-class-django-db-models-query-queryset-when-querying 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…