Skip to content

Commit

Permalink
feat(category): add the sort property on the category model
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnL17 committed May 6, 2024
1 parent cbe8293 commit 152b7c9
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 0 deletions.
18 changes: 18 additions & 0 deletions alexandria/core/migrations/0017_category_sort.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Generated by Django 3.2.25 on 2024-05-06 13:44

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
("alexandria_core", "0016_category_allowed_mime_types"),
]

operations = [
migrations.AddField(
model_name="category",
name="sort",
field=models.IntegerField(blank=True, null=True),
),
]
1 change: 1 addition & 0 deletions alexandria/core/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ class Category(SlugModel):
null=True,
related_name="children",
)
sort = models.IntegerField(blank=True, null=True)


class TagSynonymGroup(BaseModel):
Expand Down
1 change: 1 addition & 0 deletions alexandria/core/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ class Meta:
"color",
"parent",
"children",
"sort",
)


Expand Down

0 comments on commit 152b7c9

Please sign in to comment.