Hi Brian. Thank you.

I've read the documents you pointed out. But the issue is not on
404/500 html templates, but in the DEBUG setting.

I've started a project from scratch to reproduce my error. I used the
instructions provided in the latest documentation to add FlatPages and
an Admin application.

When I add a FlatPage for my site index page (URL = /) it works fine.

Then, if I change the DEBUG flag to False in my settings.py, the index
page is replaced by a 500 error.

I think this is a bug. If someone has the same behaviour it should be
reported.


On Dec 10, 6:35 pm, Brian Neal <[EMAIL PROTECTED]> wrote:
> On Dec 10, 11:48 am, Nuno Machado <[EMAIL PROTECTED]> wrote:
>
>
>
> > My urls.py WAS like this:
>
> > urlpatterns = patterns('',
> >     (r'^admin/(.*)', admin.site.root),
> >     (r'', include('django.contrib.flatpages.urls')),
> > )
>
> This is your problem. Did you read this:
>
> http://docs.djangoproject.com/en/dev/ref/contrib/flatpages/#ref-contr...
>
> Note the 4 step installation. The docs don't say to add anything to
> your URLs.
>
> > If I hit, localhost:8000 it __works fine__ BUT if I set DEBUG = False
> > in settings.py I get a 500 error TemplateDoesNotExist. With DEBUG =
> > False, if I type localhost:8000/about it doesn't work either.
>
> > This is getting worse.
>
> No, not really. You are now running into another issue when you have
> DEBUG=False. Please see this:
>
> http://docs.djangoproject.com/en/dev/topics/http/views/#customizing-e...
>
> You need to define your own 404.html and 500.html templates. When
> DEBUG=True, django let's you off the hook on this (because it will
> display its own error page for you).
>
>
>
> > But I'm really thinking in give up from Flat Pages... it's static
> > content, why do I want them in a database? Databases are for raw
> > content, not html tags.
>
> Well no, not necessarily. Sometimes you have content that you may want
> to edit from time to time without messing with the code and possibly
> restarting the server. Or you may have someone who works on the site
> who doesn't know HTML and you've given him TinyMCE or another WYSIWYG
> editor installed on the flatpages admin.
>
>
>
> > There are some fancy options in Flat Pages, like "Enable comments" and
> > "Registration Required" but I think I will easily add these features
> > in my static pages later, am I wrong?
>
> Sure you can do it either way.
>
> BN
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to