views:

228

answers:

1

How can I set a Flatpage as the Homepage?

My urls.py is

    (r'', include('django.contrib.flatpages.urls')),

In the admin section I set the URL of the Flatpage to "/".

I get this error

Firefox has detected that the server is redirecting the request for this address in a way that will never complete.

I'm guessing setting the URL to "/" is wrong, but can't find an example of the proper way to do it.

A: 

I removed the entry from the urls.py and this seems to have fixed it.

Cato Johnston
The FlatpageFallbackMiddleware is what does all the url work for the flatpages app. If a 404 is raised, the middleware checks all your flatpages for a page that matches the url and sends that back rather than the 404.
Alex Jillard