Closed NChechulin closed 3 years ago
I suppose this question might sound a little stupid, but how do I get the string from PhoneField?
PhoneField
I have my model:
class User: ... phone_number = PhoneField()
And in my view I try to send the result back to the client, but I get a message that PhoneView is not JSON serializable.
PhoneView
As usual, as soon as I ask a question I find the answer. It's PhoneField.verbose_name().
PhoneField.verbose_name()
I guess it would be cool if this would be added to the documentation...
I suppose this question might sound a little stupid, but how do I get the string from
PhoneField
?I have my model:
And in my view I try to send the result back to the client, but I get a message that
PhoneView
is not JSON serializable.