Modelesq
Modelesq

Reputation: 5402

Newline all-in-one python string

I have:

...
post_str = "Please input the following information... \nDescription: \n Last Name:"
context = {
     'post_str':post_str,
      ...
}
return render_to_response('contact/contact.html', context, context_instance=RequestContext(request))

It prints like so,

Please input the following information... Description: Last Name:.

But I'd like it to print:

Please input the following information...
Description:
Last Name:

I thought I was using it correctly. How do I get a the newline to successfully produce what I need?

Thanks for your help in advance.

Upvotes: 1

Views: 112

Answers (1)

kindall
kindall

Reputation: 184455

Newlines don't do anything in HTML. Use <br /> instead.

Upvotes: 2

Related Questions