On 11/29/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > After much googling, I found that if there is no data in the tables, it > produces a 404 error.
That's not quite correct; if there's nothing which matches the conditions of the QuerySet you pass to the generic view, and if the 'allow_empty' argument to the QuerySet is False (which is the default), then it will throw a 404. This means, for example, that if you add an object, then the 'list_detail.object_list' view will start showing that object instead of a 404, but if the date field on that object is November, and you use the 'date_based.archive_month' view for any other month, you'll still get a 404 (because there aren't any objects yet for other months). The documentation for the generic views spells this out: "allow_empty: A boolean specifying whether to display the page if no objects are available. If this is False and no objects are available, the view will raise a 404 instead of displaying an empty page. By default, this is False." -- "May the forces of evil become confused on the way to your house." -- George Carlin --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---