Open GoogleCodeExporter opened 9 years ago
Note that I was lazy and didn't paste my exact error message - instead I pasted
an
error from another report of the issue, which obviously uses an older version
of the
sdk which uses 8080. The error does, however, occur in r66 and the latest
version of
the app engine SDK.
Original comment by mattias....@gmail.com
on 28 Dec 2008 at 11:03
[deleted comment]
The problem is in, that Sites framework requires database. In django/contrib/
sitemaps/__init__.py you can find this lines:
def get_urls(self, page=1):
from django.contrib.sites.models import Site
current_site = Site.objects.get_current()
The solution is to create our own Site class with "domain" and "name" fields,
create
its instance, for example, in main.py and use it in that way:
def get_urls(self, page=1):
from models import Site
current_site = Site.all().get()
Original comment by oleg.mal...@gmail.com
on 27 Jan 2009 at 7:55
This sounds like a reasonable fix. Would you be able to provide a patch? You
will
also need to sign the CLA (see the README for details).
Original comment by mattbrow...@gmail.com
on 27 Jan 2009 at 11:11
Original comment by mattbrow...@gmail.com
on 17 Apr 2009 at 5:37
The attached patch fixes this issue for me with one exception. I don't see how
to
hook the post_syncdb signal the original sites app does to create the first Site
automatically. If someone has an idea on how to solve this please let me know.
Otherwise, I just use the method Site.bootstrap and place the site.key().id()
returned in the settings.py file if it is not 1.
Original comment by dherbst
on 4 Jan 2010 at 3:51
Attachments:
If any are interested, I integrated this patch into my fork:
http://code.google.com/p/dherbst-app-engine-django/ though I have modified
things
slightly from the patch attached above to work better. Also added a wiki entry
on
how to enable the sitemap.
Original comment by dherbst
on 4 Mar 2010 at 4:00
Original issue reported on code.google.com by
mattias....@gmail.com
on 28 Dec 2008 at 10:59