daily pastebin goal
81%
SHARE
TWEET

Untitled

a guest Jan 1st, 2013 16 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. def index(request):
  2.         latest_posts_list = Post.objects.all().order_by('-pub_date')[:5]
  3.         req = request.method   # is shown easily in {{ req }} because it's a string
  4.         # request.body is a byte string and i see nothing if using {{ req }}
  5.         req = request.body.decode('utf-8') # doesn't help
  6.         req = unicode(request.body) # doesn't help
  7.         return render_to_response(
  8.         'posts/index.html',
  9.                 {'latest_posts_list' : latest_posts_list,
  10.                   'req' : req
  11.                 }
  12.         )
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top