kb: add default limit (#39477)

This commit is contained in:
Frédéric Péters 2020-02-03 11:37:53 +01:00
parent dcc6d9f97a
commit d010ee0afd
2 changed files with 21 additions and 1 deletions

View File

@ -0,0 +1,20 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.11.17 on 2020-02-03 10:37
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('kb', '0001_initial'),
]
operations = [
migrations.AlterField(
model_name='latestpageupdatescell',
name='limit',
field=models.PositiveSmallIntegerField(default=10, verbose_name='Maximum number of entries'),
),
]

View File

@ -29,7 +29,7 @@ class LatestPageUpdatesCell(CellBase):
Page, on_delete=models.SET_NULL, null=True, blank=True,
verbose_name=_('Root Page'), related_name='kb_latest_page_updates_cell_root_page')
limit = models.PositiveSmallIntegerField(
_('Maximum number of entries'), null=True, blank=True)
_('Maximum number of entries'), default=10)
template_name = 'combo/latest-page-updates-cell.html'