Make document type deletion period optional.
This commit is contained in:
@@ -14,6 +14,7 @@
|
||||
- Add icons to the document face menu links.
|
||||
- Increase icon size by 10%.
|
||||
- Increase icon to text spacing to 3px.
|
||||
- Make document type delete time period optional.
|
||||
|
||||
2.0.2 (2016-02-09)
|
||||
==================
|
||||
|
||||
24
mayan/apps/documents/migrations/0030_auto_20160309_1837.py
Normal file
24
mayan/apps/documents/migrations/0030_auto_20160309_1837.py
Normal file
@@ -0,0 +1,24 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('documents', '0029_auto_20160122_0755'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='documenttype',
|
||||
name='delete_time_period',
|
||||
field=models.PositiveIntegerField(default=30, help_text='Amount of time after which documents of this type in the trash will be deleted.', null=True, verbose_name='Delete time period', blank=True),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='documenttype',
|
||||
name='delete_time_unit',
|
||||
field=models.CharField(default='days', choices=[('days', 'Days'), ('hours', 'Hours'), ('minutes', 'Minutes')], max_length=8, blank=True, null=True, verbose_name='Delete time unit'),
|
||||
),
|
||||
]
|
||||
@@ -76,14 +76,15 @@ class DocumentType(models.Model):
|
||||
verbose_name=_('Trash time unit')
|
||||
)
|
||||
delete_time_period = models.PositiveIntegerField(
|
||||
default=DEFAULT_DELETE_PERIOD, help_text=_(
|
||||
blank=True, default=DEFAULT_DELETE_PERIOD, help_text=_(
|
||||
'Amount of time after which documents of this type in the trash '
|
||||
'will be deleted.'
|
||||
), verbose_name=_('Delete time period')
|
||||
), null=True, verbose_name=_('Delete time period')
|
||||
)
|
||||
delete_time_unit = models.CharField(
|
||||
choices=TIME_DELTA_UNIT_CHOICES, default=DEFAULT_DELETE_TIME_UNIT,
|
||||
max_length=8, verbose_name=_('Delete time unit')
|
||||
blank=True, choices=TIME_DELTA_UNIT_CHOICES,
|
||||
default=DEFAULT_DELETE_TIME_UNIT, max_length=8, null=True,
|
||||
verbose_name=_('Delete time unit')
|
||||
)
|
||||
|
||||
objects = DocumentTypeManager()
|
||||
|
||||
Reference in New Issue
Block a user