Re: test client - Keeps returning 301 status code and not sure why.

2006-12-07 Thread Russell Keith-Magee
On 12/7/06, MerMer <[EMAIL PROTECTED]> wrote: Ok... First off - Russell wakes up and realizes the mistake he made. Note to self - don't answer email with an unhappy 7 month old in your lap. :-) I'm not sure which dark corner of my brain 'c.response' came from, but it was a bad suggestion - that

Re: test client - Keeps returning 301 status code and not sure why.

2006-12-07 Thread MerMer
Russ, I think I had failed to import everything. I have now used "from django import * with partial success. Then I tried. >>c=Client() >>d=c.get('/promotions/') >>d.content This worked and returned me a large page of in my shell view. However, >>d.context >>d.template returns nothing. >

Re: Re: test client - Keeps returning 301 status code and not sure why.

2006-12-07 Thread Russell Keith-Magee
On 12/7/06, MerMer <[EMAIL PROTECTED]> wrote: > > Russ, > > Many thanks for the response. However, c.response isn't working for > me. I'm getting "No attribute found". Running dir(c) does not show up > this method. That's wierd. I can't think of any obvious reason that that would happen. Ok -

Re: Re: test client - Keeps returning 301 status code and not sure why.

2006-12-07 Thread James Bennett
On 12/7/06, MerMer <[EMAIL PROTECTED]> wrote: > Many thanks for the response. However, c.response isn't working for > me. I'm getting "No attribute found". Running dir(c) does not show up > this method. Random, possibly silly question: do you have CommonMiddleware enabled with APPEND_SLASH = Tr

Re: test client - Keeps returning 301 status code and not sure why.

2006-12-07 Thread MerMer
Russ, Many thanks for the response. However, c.response isn't working for me. I'm getting "No attribute found". Running dir(c) does not show up this method. MerMer --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Gro

Re: test client - Keeps returning 301 status code and not sure why.

2006-12-06 Thread Russell Keith-Magee
On 12/7/06, MerMer <[EMAIL PROTECTED]> wrote: > > I am trying to get to grips with the test client > (Django.test.client.Client) > > I've done the following > > >>from Djano.test.client import Client > >>c=Client() > >>c=c.get('/promotions/',) > >>c.status_code > 301 301 is a permanent redirectio