On Tue, May 3, 2011 at 5:07 PM, Jeff Blaine <cjbla...@gmail.com> wrote:
> Thanks Jacob -- does the site entry in the database have to be anything
> specific?  We don't really use that.  Just put any old thing in there via
> Admin in the development server?

Well, if you want all the parts of the admin to work correctly
(especially those "view on site" buttons and similar features) you
probably should set the entry to something that actually exists.
Django will happily think your site is running on
http://www.example.com/, but I really doubt that it is.

> I have a SITE_ID = 1 in settings.py from, I assume, when the project was
> made.  I suspect when I deleted the 'example.com' site last week, that broke
> the relationship, no?

Probably, yes.

When Django needs to know which site it's running on it does something like::

    Site.objects.get(id=settings.SITE_ID)

If you've broken that (by deleting the site object, changing SITE_ID,
taking django.contrib.sites out of INSTALLED_APPS, etc.) then it won't
quite work, as you might imagine.

Jacob

-- 
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 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to