Skip to content

Commit

Permalink
fix: webpath/pub_context ordering
Browse files Browse the repository at this point in the history
  • Loading branch information
francesco-filicetti committed Oct 14, 2021
1 parent fefb935 commit 7fc775f
Show file tree
Hide file tree
Showing 6 changed files with 54 additions and 3 deletions.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def get_requirements(fname='requirements.txt'):

setup(
name="unicms",
version='0.27.0',
version='0.27.1',
description="uniCMS is a Django Web Content Management System",
long_description=README,
long_description_content_type='text/markdown',
Expand Down
17 changes: 17 additions & 0 deletions src/cms/contexts/migrations/0010_alter_webpath_options.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Generated by Django 3.2.5 on 2021-10-14 21:33

from django.db import migrations


class Migration(migrations.Migration):

dependencies = [
('cmscontexts', '0009_alter_webpath_options'),
]

operations = [
migrations.AlterModelOptions(
name='webpath',
options={'ordering': ['path'], 'verbose_name_plural': 'Site Contexts (WebPaths)'},
),
]
17 changes: 17 additions & 0 deletions src/cms/contexts/migrations/0011_alter_webpath_options.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Generated by Django 3.2.5 on 2021-10-14 21:38

from django.db import migrations


class Migration(migrations.Migration):

dependencies = [
('cmscontexts', '0010_alter_webpath_options'),
]

operations = [
migrations.AlterModelOptions(
name='webpath',
options={'ordering': ['fullpath'], 'verbose_name_plural': 'Site Contexts (WebPaths)'},
),
]
2 changes: 1 addition & 1 deletion src/cms/contexts/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ class WebPath(ActivableModel, TimeStampedModel, CreatedModifiedBy):

class Meta:
verbose_name_plural = _("Site Contexts (WebPaths)")
ordering = ['name']
ordering = ['fullpath']

def split(self) -> list:
"""
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Generated by Django 3.2.5 on 2021-10-14 21:39

from django.db import migrations


class Migration(migrations.Migration):

dependencies = [
('cmspublications', '0018_alter_publicationcontext_options'),
]

operations = [
migrations.AlterModelOptions(
name='publicationcontext',
options={'ordering': ['webpath__fullpath', 'order'], 'verbose_name_plural': 'Publication Contexts'},
),
]
2 changes: 1 addition & 1 deletion src/cms/publications/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ class PublicationContext(TimeStampedModel, ActivableModel,

class Meta:
verbose_name_plural = _("Publication Contexts")
ordering = ['order']
ordering = ['webpath__fullpath', 'order']

@property
def path_prefix(self):
Expand Down

0 comments on commit 7fc775f

Please sign in to comment.