Hi, > > I suspect you hit one small Django controversy. The generic view > > object_list would give you 404 error when the list it tries to show is > > empty. The view is there, it works, finds the list -- all is Ok. It just > > has this strange behavior by default. To overcome it you can add > > allow_empty: True to its infodict. > add "allow_empty: True" to the infodict of what? To your urls.py. As an example taken from your tutorial:
from django.conf.urls.defaults import * from wilson.apps.portfolio.models import Project info_dict = { 'queryset': Project.objects.all(), } urlpatterns = patterns('', (r'^work/$', 'django.views.generic.list_detail.object_list', dict(info_dict, template_name="portfolio/projects_list.html", allow_empty=True)), (r'^work/(?P<slug>[-\w]+)/$', 'django.views.generic.date_based.object_detail', dict(info_dict, slug_field='slug')), ) > could this also be solved by actually adding data to the db before > trying to look at the page? As well. But you simply get round the problem, not solve it. Hope it helps, G --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---