sitemaps not quite as easy to setup as suggested?

27 views
Skip to first unread message

in...@webbricks.co.uk

unread,
May 27, 2011, 6:56:37 AM5/27/11
to Django users
hi all, struggling to get sitemaps setup. followed docs, including
working out there was an import missing in the docco.

this is the copy n paste error

Environment:


Request Method: GET
Request URL: http://coatesconstruction.co.uk/sitemap.xml

Django Version: 1.3
Python Version: 2.5.2
Installed Applications:
['django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.messages',
'django.contrib.staticfiles',
'django.contrib.sitemaps',
'django.contrib.admin',
'frontpage',
'contact_form',
'projects',
'testimonials',
'south']
Installed Middleware:
('django.middleware.common.CommonMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware')


Traceback:
File "/home/shofty/virtualenvs/coates/lib/python2.5/site-packages/
django/core/handlers/base.py" in get_response
111. response = callback(request,
*callback_args, **callback_kwargs)
File "/home/shofty/virtualenvs/coates/lib/python2.5/site-packages/
django/contrib/sitemaps/views.py" in sitemap
33. maps = sitemaps.values()

Exception Type: AttributeError at /sitemap.xml
Exception Value: 'module' object has no attribute 'values'

should i be populating sitemaps in the urls file?

in...@webbricks.co.uk

unread,
May 27, 2011, 11:22:00 AM5/27/11
to Django users
ok, read the docs properly and understood it a bit more. im stuck with
one thing though. i get how simple it is to tell the sitemap about all
the objects that have been created but what about the static pages,
where you've not used flatpages. for instance a contact form you've
created, this should be in the sitemap, but isnt a flatpage.

how do i go about adding them to the dict in the urls file?

Addy Yeow

unread,
May 27, 2011, 11:45:25 AM5/27/11
to django...@googlegroups.com
I keep sitemap for those objects in 1 sitemap file, and manually create another sitemap file for all my static pages.
Then, create a sitemap index to point to the two.

Would love to hear from others though.


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




--
http://www.dazzlepod.com . http://twitter.com/dazzlepod
We write elegant and minimal apps that works. We develop web apps with Django framework.

in...@webbricks.co.uk

unread,
May 27, 2011, 11:54:27 AM5/27/11
to Django users
found the following snippet of code, managed to get it doing what i
want with it.

http://stackoverflow.com/questions/4836188/django-sitemaps-and-normal-views

Matt

On May 27, 4:45 pm, Addy Yeow <ayeo...@gmail.com> wrote:
> I keep sitemap for those objects in 1 sitemap file, and manually create
> another sitemap file for all my static pages.
> Then, create a sitemap index to point to the two.
>
> Would love to hear from others though.
>
> On Fri, May 27, 2011 at 11:22 PM, i...@webbricks.co.uk <i...@webbricks.co.uk
>
>
>
>
>
>
>
>
>
> > wrote:
> > ok, read the docs properly and understood it a bit more. im stuck with
> > one thing though. i get how simple it is to tell the sitemap about all
> > the objects that have been created but what about the static pages,
> > where you've not used flatpages. for instance a contact form you've
> > created, this should be in the sitemap, but isnt a flatpage.
>
> > how do i go about adding them to the dict in the urls file?
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Django users" group.
> > To post to this group, send email to django...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > django-users...@googlegroups.com.
> > For more options, visit this group at
> >http://groups.google.com/group/django-users?hl=en.
>
> --http://www.dazzlepod.com.http://twitter.com/dazzlepod
Reply all
Reply to author
Forward
0 new messages