article fetch limit fields
This commit is contained in:
parent
2478e35f8d
commit
4033ed6e7b
@ -0,0 +1,24 @@
|
||||
# Generated by Django 5.0.4 on 2024-06-25 09:41
|
||||
|
||||
import django.core.validators
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('home', '0007_remove_subscription_mutators_and_more'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='subscription',
|
||||
name='article_fetch_limit',
|
||||
field=models.PositiveSmallIntegerField(default=10, validators=[django.core.validators.MaxValueValidator(1), django.core.validators.MinValueValidator(10)]),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='subscription',
|
||||
name='reset_article_fetch_limit',
|
||||
field=models.BooleanField(default=False),
|
||||
),
|
||||
]
|
@ -6,6 +6,7 @@ from pathlib import Path
|
||||
from django.db import models
|
||||
from django.utils import timezone
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
from django.core.validators import MaxValueValidator, MinValueValidator
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
@ -216,6 +217,13 @@ class Subscription(models.Model):
|
||||
blank=True,
|
||||
)
|
||||
|
||||
article_fetch_limit = models.PositiveSmallIntegerField(
|
||||
validators = [MaxValueValidator(1), MinValueValidator(10)],
|
||||
default=10
|
||||
)
|
||||
|
||||
reset_article_fetch_limit = models.BooleanField(default=False)
|
||||
|
||||
active = models.BooleanField(default=True)
|
||||
|
||||
class Meta:
|
||||
|
Loading…
x
Reference in New Issue
Block a user