I am trying to get a len of a textfield in Django so I can manipulate it in my template since the name of the school is too long, it is overlapping in the PDF display. I found this old post here in SO How to get the length of a TextField in Django?
I am trying to get the length of a school field which is related to another model.
x = Recipient.objects.get(id='1234551') len(x.department.school) This gives me an error: object of type 'Recipient' has no len(). School is also a field and it seems to work on the old post. I just don't understand why it doesn't work in my end.