0

I want to display strings with new lines in ChoiceField form but it is rendered in just one line.

s = "name: x \n  email: x@gmail.com"

But after it's rendered it's showing like this:

name: x  email: x@gmail.com

And not like this:

name: x 
email: x@gmail.com

Please suggest me some workaround in the backend and not in the frontend part.

James Z
  • 12,209
  • 10
  • 24
  • 44
Abhinav Prakash
  • 124
  • 1
  • 1
  • 10

0 Answers0