Flatpages problem

1 view
Skip to first unread message

Edmund

unread,
Aug 2, 2006, 11:46:37 PM8/2/06
to Django users
Newbie question here... I installed Flatpages as per the docs. Then, I
created a flatpage via the admin interface, and also checked that the
SITE_IDs shown matched that in my settings.py.

But, I get a 404. On tracing through the 404, I see that it is being
raised in ~/django_src/django/shortcuts/__init__.py as a result of a
klass.DoesNotExist exception in the get_object_or_404 method.

What does this mean? What have I not done?

Adrian Holovaty

unread,
Aug 3, 2006, 10:14:12 AM8/3/06
to django...@googlegroups.com

Hi Edmund,

Are you sure you added
'django.contrib.flatpages.middleware.FlatpageFallbackMiddleware' to
your MIDDLEWARE_CLASSES setting? That's the part that actually
*serves* the flatpages.

Adrian

--
Adrian Holovaty
holovaty.com | djangoproject.com

Edmund

unread,
Aug 3, 2006, 3:41:47 PM8/3/06
to Django users

Adrian Holovaty wrote:

> Are you sure you added
> 'django.contrib.flatpages.middleware.FlatpageFallbackMiddleware' to
> your MIDDLEWARE_CLASSES setting? That's the part that actually
> *serves* the flatpages.

Thanks for the reply Adrian. Yes, I did add this. I was using
mod_python and Apache2. I've gone back to using the dev server, and
things seem to be working now. Must have set up something incorrectly
in the Apache config. I'll have to take a closer look at this to see
what the problem was.


...Edmund.

Reply all
Reply to author
Forward
0 new messages