Skip to content Skip to sidebar Skip to footer

Why My Strange Results Rendering The User Object?

For some reason, my variable {{current_user.name}} doesn't display anything and the variable {{username}} displays instead of Niklas R it displays `(u'Niklas R',) on the page that

Solution 1:

This happens to me all the time, you have an extra , and the variable becomes a tuple.

change the lines to:

data[u'current_user']=self.current_user
data[u'username']=self.current_user.name

Post a Comment for "Why My Strange Results Rendering The User Object?"