views:

173

answers:

1

Hello all,

I just setup django's flatpages app following http://docs.djangoproject.com/en/dev/ref/contrib/flatpages/

Everything is fine, but when i link to a flatpage, i always get:

Page not found (404)
Request Method:     GET
Request URL:    http://example.com/about/

[..]

The current URL, about/, didn't match any of these.

what is that about? what may cause this error?

thanks in advance...

+1  A: 
  1. Do you have FlatpageFallbackMiddleware in your list of MIDDLEWARE_CLASSES?

  2. Is there definitely a flatpage in your database with /about/ in the URL field?

  3. Is the flatpage linked to the correct Site object? It has to be linked to the Site object with a numeric ID matching the SITE_ID in your settings.py. The actual name/domain of the Site object are irrelevant in this case, it's just the numeric ID you have to watch out for. In my experience this is the most common cause of mysteriously missing flatpages.

The request URL "http://example.com/about/" in your pasted 404 is confusing - I assume you put it there to hide your actual domain? Because if the actual request URL were at example.com, you wouldn't get this Django debug page.

Carl Meyer
Hehe, you're right.. My problem was also the third one and after I realized that, I solved it.. Thanks you also mention that!
israkir