2021-06-19 21:09:05 +00:00
|
|
|
from django.db import migrations, models
|
|
|
|
from django.utils import timezone
|
|
|
|
|
|
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
|
|
dependencies = [
|
2022-02-10 00:00:30 +00:00
|
|
|
("babybuddy", "0016_alter_settings_timezone"),
|
2021-06-19 21:09:05 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
operations = [
|
|
|
|
migrations.AddField(
|
2022-02-10 00:00:30 +00:00
|
|
|
model_name="settings",
|
|
|
|
name="dashboard_hide_age",
|
2021-06-19 21:09:05 +00:00
|
|
|
field=models.DurationField(
|
|
|
|
choices=[
|
2022-02-10 00:00:30 +00:00
|
|
|
(None, "show all data"),
|
|
|
|
(timezone.timedelta(days=1), "1 day"),
|
|
|
|
(timezone.timedelta(days=2), "2 days"),
|
|
|
|
(timezone.timedelta(days=3), "3 days"),
|
|
|
|
(timezone.timedelta(weeks=1), "1 week"),
|
|
|
|
(timezone.timedelta(weeks=4), "4 weeks"),
|
2021-06-19 21:09:05 +00:00
|
|
|
],
|
|
|
|
default=None,
|
|
|
|
null=True,
|
2022-02-10 00:00:30 +00:00
|
|
|
verbose_name="Hide data older than",
|
|
|
|
),
|
2021-06-19 21:09:05 +00:00
|
|
|
),
|
|
|
|
]
|