Skip to content

Commit 0c046d8

Browse files
committed
feature: add wiggle propperties
1 parent eddc2f8 commit 0c046d8

File tree

3 files changed

+22
-1
lines changed

3 files changed

+22
-1
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Generated by Django 4.2.16 on 2026-01-20 12:07
2+
3+
from django.db import migrations, models
4+
5+
6+
class Migration(migrations.Migration):
7+
8+
dependencies = [
9+
("articles", "0013_alter_article_description"),
10+
]
11+
12+
operations = [
13+
migrations.AddField(
14+
model_name="article",
15+
name="wiggle",
16+
field=models.BooleanField(default=False),
17+
),
18+
]

lego/apps/articles/models.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
from django.conf import settings
2-
from django.db.models import CharField, ManyToManyField
2+
from django.db.models import BooleanField, CharField, ManyToManyField
33

44
from lego.apps.content.models import Content
55
from lego.apps.files.models import FileField
@@ -15,6 +15,7 @@ class Article(Content, BasisModel, ObjectPermissionsModel):
1515
max_length=200, default="", validators=[youtube_validator], blank=True
1616
)
1717
authors = ManyToManyField(User)
18+
wiggle = BooleanField(default=False)
1819

1920
def save(self, *args, **kwargs):
2021
if self.pinned:

lego/apps/articles/serializers.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ class Meta:
5050
"pinned",
5151
"reactions_grouped",
5252
"youtube_url",
53+
"wiggle",
5354
)
5455

5556

@@ -101,4 +102,5 @@ class Meta:
101102
"tags",
102103
"created_at",
103104
"pinned",
105+
"wiggle",
104106
)

0 commit comments

Comments
 (0)