Re: Generic login view bug suspection

2007-04-19 Thread Rob J Goedman
Thanks a lot, this answers my question from a couple of days as well!
It works again!

Rob


On Apr 19, 2007, at 8:05 AM, James Bennett wrote:

>
> On 4/19/07, mojo <[EMAIL PROTECTED]> wrote:
>> I think this might be a bug. Unexpected behaviour at least.
>> When I delete default Site object ('example.com'), generic login  
>> view raises
>> exception, as it is looking for Site with pk=1.
>
> We really need to document this a little better; if you delete that
> Site object, you'll have to create a new one and change the SITE_ID
> setting in your settings file to match the id of that new object,
> because lots of things use that to look up site-specific content.
>
> The preferred method is simply to edit the default Site object to have
> the correct domain name.


On Apr 17, 2007, at 10:27 AM, Rob J Goedman wrote:
> Hi,
>
> In Django version 0.97-pre, rev 5020, I'm adding additional views  
> for end users, all decorated with @login_required.
>
> I noticed if I'm not already logged in (by 1st visiting .../ 
> admin/), I get  below error (reproduced in a python terminal, same  
> problem as in a browser - [17/Apr/2007 10:22:43] "GET /accounts/ 
> login/?next=/GUI/start/ HTTP/1.1" 500 51242 gives:
>
> DoesNotExist at /accounts/login/
> Site matching query does not exist.
>
> Request Method:
> GET
> Request URL:
> http://localhost:8000/accounts/login/
> Exception Type:
> DoesNotExist
> Exception Value:
> Site matching query does not exist.
> Exception Location:
> /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/ 
> site-packages/django/db/models/query.py in get, line 252
>
> ).




--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



RE: Generic login view bug suspection

2007-04-19 Thread mojo

I see now. Thank you.
I just hoped that I found a bug.

-Original Message-
From: django-users@googlegroups.com [mailto:[EMAIL PROTECTED]
On Behalf Of James Bennett
Sent: Thursday, April 19, 2007 7:05 PM
To: django-users@googlegroups.com
Subject: Re: Generic login view bug suspection


On 4/19/07, mojo <[EMAIL PROTECTED]> wrote:
> I think this might be a bug. Unexpected behaviour at least.
> When I delete default Site object ('example.com'), generic login view
raises
> exception, as it is looking for Site with pk=1.

We really need to document this a little better; if you delete that
Site object, you'll have to create a new one and change the SITE_ID
setting in your settings file to match the id of that new object,
because lots of things use that to look up site-specific content.

The preferred method is simply to edit the default Site object to have
the correct domain name.

-- 
"Bureaucrat Conrad, you are technically correct -- the best kind of
correct."


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Generic login view bug suspection

2007-04-19 Thread James Bennett

On 4/19/07, mojo <[EMAIL PROTECTED]> wrote:
> I think this might be a bug. Unexpected behaviour at least.
> When I delete default Site object ('example.com'), generic login view raises
> exception, as it is looking for Site with pk=1.

We really need to document this a little better; if you delete that
Site object, you'll have to create a new one and change the SITE_ID
setting in your settings file to match the id of that new object,
because lots of things use that to look up site-specific content.

The preferred method is simply to edit the default Site object to have
the correct domain name.

-- 
"Bureaucrat Conrad, you are technically correct -- the best kind of correct."

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---