Wednesday, May 25, 2011

Re: Weird Error when following django book?

The "u" before the opening quote is Python's way of telling you that
it's a Unicode string instead of an ASCII string.

On May 25, 11:54 am, raj <nano.ri...@gmail.com> wrote:
> I'm up to the html template part of the djangobook, and I keep getting
> a weird output error whenever I do a t.render() call. It's a really
> small error but I want to make sure that my django module is correctly
> working. This is the output I got from the example in the django book:
>
> u"<p>Dead John Smith, </p>\n\n<p>Thanks for ordering Super Lawn Mower
> from Outdoor Equipment. It's scheduled\nto ship on April 2, 2009.</p>\n
> \n\n<p>Your warranty information will be included in the packing. </p>
> \n\n\n<p>Sincerely, <br /> Outdoor Equipment </p>"
>
> It may look correct, but if you notice, right in the start of the
> entire script, I get the letter "u", this happens when I render
> anything. I always get this "u" right in the beginning of the output!
> I don't know why this is happening. Please help?
> Thank you.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate