- Abschnitte Heute/Gestern/Diese Woche/Diesen Monat/Älter; je Abschnitt bis zu 5 Posts je Favoriten-Blog zuerst, dann „Seltene zuerst“ (mittlerer Abstand der letzten 10 Posts, ein Post = 30 Tage) oder chronologisch - Blog „im Hauptfeed ausblenden“: nicht unter Alle und nicht gezählt, im Ordner da - NEU (jünger als 24 h, ungelesen) am Post, als Zahl am Tab, Punkt am Ordner - Chips Ungelesen/Alle, ★ Favoriten, Seltene zuerst; Schalter je Blog - Lesezeit (Wörter/230) an jedem Post; words wird beim Speichern gezählt - sw v93 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
42 lines
1.2 KiB
Python
42 lines
1.2 KiB
Python
# Generated by Django 6.1 on 2026-10-04 19:28
|
|
|
|
from django.db import migrations, models
|
|
|
|
|
|
def count_words(apps, schema_editor):
|
|
"""The reading time of the articles already there."""
|
|
from feeds.fetch import word_count
|
|
Item = apps.get_model('feeds', 'Item')
|
|
for item in Item.objects.exclude(content='').only('id', 'content').iterator():
|
|
Item.objects.filter(pk=item.pk).update(words=word_count(item.content))
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
|
|
dependencies = [
|
|
('feeds', '0002_item_paywalled_sitelogin'),
|
|
]
|
|
|
|
operations = [
|
|
migrations.AddField(
|
|
model_name='item',
|
|
name='words',
|
|
field=models.PositiveIntegerField(default=0),
|
|
),
|
|
migrations.AddField(
|
|
model_name='source',
|
|
name='fav',
|
|
field=models.BooleanField(default=False),
|
|
),
|
|
migrations.AddField(
|
|
model_name='source',
|
|
name='hidden',
|
|
field=models.BooleanField(default=False),
|
|
),
|
|
migrations.AddField(
|
|
model_name='source',
|
|
name='notify',
|
|
field=models.BooleanField(default=False),
|
|
),
|
|
migrations.RunPython(count_words, migrations.RunPython.noop),
|
|
]
|