Ticket #685: allow_empty=True.diff
| File allow_empty=True.diff, 4.8 kB (added by Gary Wilson <gary.wilson@gmail.com>, 2 years ago) |
|---|
-
django/views/generic/date_based.py
old new 7 7 8 8 def archive_index(request, queryset, date_field, num_latest=15, 9 9 template_name=None, template_loader=loader, 10 extra_context=None, allow_empty= False, context_processors=None,10 extra_context=None, allow_empty=True, context_processors=None, 11 11 mimetype=None, allow_future=False): 12 12 """ 13 13 Generic top-level archive of date-based objects. … … 47 47 return HttpResponse(t.render(c), mimetype=mimetype) 48 48 49 49 def archive_year(request, year, queryset, date_field, template_name=None, 50 template_loader=loader, extra_context=None, allow_empty= False,50 template_loader=loader, extra_context=None, allow_empty=True, 51 51 context_processors=None, template_object_name='object', mimetype=None, 52 52 make_object_list=False, allow_future=False): 53 53 """ … … 96 96 97 97 def archive_month(request, year, month, queryset, date_field, 98 98 month_format='%b', template_name=None, template_loader=loader, 99 extra_context=None, allow_empty= False, context_processors=None,99 extra_context=None, allow_empty=True, context_processors=None, 100 100 template_object_name='object', mimetype=None, allow_future=False): 101 101 """ 102 102 Generic monthly archive view. … … 210 210 211 211 def archive_day(request, year, month, day, queryset, date_field, 212 212 month_format='%b', day_format='%d', template_name=None, 213 template_loader=loader, extra_context=None, allow_empty= False,213 template_loader=loader, extra_context=None, allow_empty=True, 214 214 context_processors=None, template_object_name='object', 215 215 mimetype=None, allow_future=False): 216 216 """ -
django/views/generic/list_detail.py
old new 5 5 from django.core.exceptions import ObjectDoesNotExist 6 6 7 7 def object_list(request, queryset, paginate_by=None, page=None, 8 allow_empty= False, template_name=None, template_loader=loader,8 allow_empty=True, template_name=None, template_loader=loader, 9 9 extra_context=None, context_processors=None, template_object_name='object', 10 10 mimetype=None): 11 11 """ -
docs/generic_views.txt
old new 186 186 * ``allow_empty``: A boolean specifying whether to display the page if no 187 187 objects are available. If this is ``False`` and no objects are available, 188 188 the view will raise a 404 instead of displaying an empty page. By 189 default, this is `` False``.189 default, this is ``True``. 190 190 191 191 * ``context_processors``: A list of template-context processors to apply to 192 192 the view's template. See the `RequestContext docs`_. … … 260 260 * ``allow_empty``: A boolean specifying whether to display the page if no 261 261 objects are available. If this is ``False`` and no objects are available, 262 262 the view will raise a 404 instead of displaying an empty page. By 263 default, this is `` False``.263 default, this is ``True``. 264 264 265 265 * ``context_processors``: A list of template-context processors to apply to 266 266 the view's template. See the `RequestContext docs`_. … … 354 354 * ``allow_empty``: A boolean specifying whether to display the page if no 355 355 objects are available. If this is ``False`` and no objects are available, 356 356 the view will raise a 404 instead of displaying an empty page. By 357 default, this is `` False``.357 default, this is ``True``. 358 358 359 359 * ``context_processors``: A list of template-context processors to apply to 360 360 the view's template. See the `RequestContext docs`_. … … 520 520 * ``allow_empty``: A boolean specifying whether to display the page if no 521 521 objects are available. If this is ``False`` and no objects are available, 522 522 the view will raise a 404 instead of displaying an empty page. By 523 default, this is `` False``.523 default, this is ``True``. 524 524 525 525 * ``context_processors``: A list of template-context processors to apply to 526 526 the view's template. See the `RequestContext docs`_. … … 704 704 * ``allow_empty``: A boolean specifying whether to display the page if no 705 705 objects are available. If this is ``False`` and no objects are available, 706 706 the view will raise a 404 instead of displaying an empty page. By 707 default, this is `` False``.707 default, this is ``True``. 708 708 709 709 * ``context_processors``: A list of template-context processors to apply to 710 710 the view's template. See the `RequestContext docs`_.
