strange problem when throung official tutorial

2014-07-06 Thread Jerry Wu
Hi, all, I think I follow every step on tutorial 05 'The Django Test Client' part with shell. When I created a new Poll with questions "Who is your favorite beatles?" and save, some thing should came when I called response.content. But it still told me "No Polls are available". I have changed

NoReverseMatch error when following Django Tutorial

2014-06-22 Thread Jerry Wu
Dear every one, I am new to Python and Django and am following the Tutorial to start my first site. But I am getting an error of NoReverseMatch error when vote. It should be redirected but error below happened. NoReverseMatch at /polls/1/vote/ Reverse for ' results' with arguments '(1,)' and k

Re: NoReverseMatch error when following Django Tutorial

2014-06-22 Thread Jerry Wu
It works! Thank you very much! On Sunday, June 22, 2014 7:54:41 PM UTC+8, Noxxan wrote: > > Hi > It looks like you have in polls/views.py whitespace in reverse function > ("polls: results"), try without it ('polls:results"). > > On Sunday, June 22,

Time Zone Problem when following on tutorial

2014-06-23 Thread Jerry Wu
Dear every one, I am following the tutorial and meet with some problem with Time Zone part. Since I am in Shanghai, China (UTC+8) , I think it is necessary to reset the time part. Below is what I tried but failed with valuerror incorrec

Re: Time Zone Problem when following on tutorial

2014-06-24 Thread Jerry Wu
Thanks, Mike. I still have a question. In your code, which part should I change in order to set the time zone to Asia/Shanghai? On Tuesday, June 24, 2014 7:26:52 AM UTC+8, Mike Dewhirst wrote: > > On 24/06/2014 8:34 AM, Jerry Wu wrote: > > Dear every one, > > >

Re: Time Zone Problem when following on tutorial

2014-07-03 Thread Jerry Wu
tiny performance > gain avoiding calculating a local time. > > The backwards compatibility thing is vital because if you have history in > your database you can't just switch the base from UTC+8 to UTC without > making all the stored times invalid by 8 hours. > > What d