added verbose names to collection app models
This commit is contained in:
parent
919c625bbc
commit
9687a0ec3b
21
apps/collection/migrations/0005_auto_20190823_1401.py
Normal file
21
apps/collection/migrations/0005_auto_20190823_1401.py
Normal file
|
|
@ -0,0 +1,21 @@
|
||||||
|
# Generated by Django 2.2.4 on 2019-08-23 14:01
|
||||||
|
|
||||||
|
from django.db import migrations
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('collection', '0004_collection_on_top'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AlterModelOptions(
|
||||||
|
name='collection',
|
||||||
|
options={'verbose_name': 'collection', 'verbose_name_plural': 'collections'},
|
||||||
|
),
|
||||||
|
migrations.AlterModelOptions(
|
||||||
|
name='guide',
|
||||||
|
options={'verbose_name': 'guide', 'verbose_name_plural': 'guides'},
|
||||||
|
),
|
||||||
|
]
|
||||||
|
|
@ -62,6 +62,16 @@ class Collection(ProjectBaseMixin, CollectionNameMixin,
|
||||||
|
|
||||||
objects = CollectionQuerySet.as_manager()
|
objects = CollectionQuerySet.as_manager()
|
||||||
|
|
||||||
|
class Meta:
|
||||||
|
"""Meta class."""
|
||||||
|
verbose_name = _('collection')
|
||||||
|
verbose_name_plural = _('collections')
|
||||||
|
|
||||||
|
def __str__(self):
|
||||||
|
"""String method."""
|
||||||
|
return f'{self.name}'
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class CollectionItemQuerySet(models.QuerySet):
|
class CollectionItemQuerySet(models.QuerySet):
|
||||||
"""QuerySet for model CollectionItem."""
|
"""QuerySet for model CollectionItem."""
|
||||||
|
|
@ -103,3 +113,11 @@ class Guide(ProjectBaseMixin, CollectionNameMixin, CollectionDateMixin):
|
||||||
|
|
||||||
objects = GuideQuerySet.as_manager()
|
objects = GuideQuerySet.as_manager()
|
||||||
|
|
||||||
|
class Meta:
|
||||||
|
"""Meta class."""
|
||||||
|
verbose_name = _('guide')
|
||||||
|
verbose_name_plural = _('guides')
|
||||||
|
|
||||||
|
def __str__(self):
|
||||||
|
"""String method."""
|
||||||
|
return f'{self.name}'
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user