Message 210498 - Python tracker (original) (raw)
Message210498
Author | Joshua.Johnston |
---|---|
Recipients | Claudiu.Popa, Joshua.Johnston, ezio.melotti, orsenthil, r.david.murray |
Date | 2014-02-07.17:25:39 |
SpamBayes Score | -1.0 |
Marked as misclassified | Yes |
Message-id | 1391793939.29.0.0328048997594.issue18857@psf.upfronthosting.co.za |
In-reply-to |
Content |
---|
In this exact example it would be an empty string. It was a fake setup to illustrate a real problem. This is the important part: params = dict(screen_name=None,count=300) url = "https://api.twitter.com/1.1/friends/ids.json?" + urllib.urlencode(params) print url # "https://api.twitter.com/1.1/friends/ids.json?screen_name=None&count=300" screen_name=None is not the behavior you would want. Another example is in webapp2's uri_for function which uses urlencode internally. ref: http://stackoverflow.com/questions/7081250/webapp2-jinja2-how-can-i-get-uri-for-working-in-jinja2-views If you try to use uri_for in your jinja2 template you must jump through hoops like: |
History | |||
---|---|---|---|
Date | User | Action | Args |
2014-02-07 17:25:39 | Joshua.Johnston | set | recipients: + Joshua.Johnston, orsenthil, ezio.melotti, r.david.murray, Claudiu.Popa |
2014-02-07 17:25:39 | Joshua.Johnston | set | messageid: 1391793939.29.0.0328048997594.issue18857@psf.upfronthosting.co.za |
2014-02-07 17:25:39 | Joshua.Johnston | link | issue18857 messages |
2014-02-07 17:25:39 | Joshua.Johnston | create |