kopia lustrzana https://github.com/wagtail/wagtail
Fixed capitalisation of field verbose names
rodzic
96240288f8
commit
f698c2fb52
|
@ -14,85 +14,79 @@ class Migration(migrations.Migration):
|
||||||
migrations.AlterField(
|
migrations.AlterField(
|
||||||
model_name='grouppagepermission',
|
model_name='grouppagepermission',
|
||||||
name='group',
|
name='group',
|
||||||
field=models.ForeignKey(related_name='page_permissions', verbose_name='group', to='auth.Group'),
|
field=models.ForeignKey(verbose_name='Group', related_name='page_permissions', to='auth.Group'),
|
||||||
preserve_default=True,
|
preserve_default=True,
|
||||||
),
|
),
|
||||||
migrations.AlterField(
|
migrations.AlterField(
|
||||||
model_name='grouppagepermission',
|
model_name='grouppagepermission',
|
||||||
name='page',
|
name='page',
|
||||||
field=models.ForeignKey(related_name='group_permissions', verbose_name='page', to='wagtailcore.Page'),
|
field=models.ForeignKey(verbose_name='Page', related_name='group_permissions', to='wagtailcore.Page'),
|
||||||
preserve_default=True,
|
preserve_default=True,
|
||||||
),
|
),
|
||||||
migrations.AlterField(
|
migrations.AlterField(
|
||||||
model_name='grouppagepermission',
|
model_name='grouppagepermission',
|
||||||
name='permission_type',
|
name='permission_type',
|
||||||
field=models.CharField(max_length=20, verbose_name='permission type', choices=[('add', 'Add/edit pages you own'), ('edit', 'Add/edit any page'), ('publish', 'Publish any page'), ('lock', 'Lock/unlock any page')]),
|
field=models.CharField(choices=[('add', 'Add/edit pages you own'), ('edit', 'Add/edit any page'), ('publish', 'Publish any page'), ('lock', 'Lock/unlock any page')], max_length=20, verbose_name='Permission type'),
|
||||||
preserve_default=True,
|
preserve_default=True,
|
||||||
),
|
),
|
||||||
migrations.AlterField(
|
migrations.AlterField(
|
||||||
model_name='page',
|
model_name='page',
|
||||||
name='search_description',
|
name='search_description',
|
||||||
field=models.TextField(verbose_name='search description', blank=True),
|
field=models.TextField(blank=True, verbose_name='Search description'),
|
||||||
preserve_default=True,
|
|
||||||
),
|
|
||||||
migrations.AlterField(
|
|
||||||
model_name='page',
|
|
||||||
name='seo_title',
|
|
||||||
field=models.CharField(help_text="Optional. 'Search Engine Friendly' title. This will appear at the top of the browser window.", max_length=255, verbose_name='page title', blank=True),
|
|
||||||
preserve_default=True,
|
preserve_default=True,
|
||||||
),
|
),
|
||||||
migrations.AlterField(
|
migrations.AlterField(
|
||||||
model_name='page',
|
model_name='page',
|
||||||
name='show_in_menus',
|
name='show_in_menus',
|
||||||
field=models.BooleanField(default=False, help_text='Whether a link to this page will appear in automatically generated menus', verbose_name='show in menus'),
|
field=models.BooleanField(default=False, help_text='Whether a link to this page will appear in automatically generated menus', verbose_name='Show in menus'),
|
||||||
preserve_default=True,
|
preserve_default=True,
|
||||||
),
|
),
|
||||||
migrations.AlterField(
|
migrations.AlterField(
|
||||||
model_name='page',
|
model_name='page',
|
||||||
name='slug',
|
name='slug',
|
||||||
field=models.SlugField(help_text='The name of the page as it will appear in URLs e.g http://domain.com/blog/[my-slug]/', max_length=255, verbose_name='slug'),
|
field=models.SlugField(help_text='The name of the page as it will appear in URLs e.g http://domain.com/blog/[my-slug]/', max_length=255, verbose_name='Slug'),
|
||||||
preserve_default=True,
|
preserve_default=True,
|
||||||
),
|
),
|
||||||
migrations.AlterField(
|
migrations.AlterField(
|
||||||
model_name='page',
|
model_name='page',
|
||||||
name='title',
|
name='title',
|
||||||
field=models.CharField(help_text="The page title as you'd like it to be seen by the public", max_length=255, verbose_name='title'),
|
field=models.CharField(help_text="The page title as you'd like it to be seen by the public", max_length=255, verbose_name='Title'),
|
||||||
preserve_default=True,
|
preserve_default=True,
|
||||||
),
|
),
|
||||||
migrations.AlterField(
|
migrations.AlterField(
|
||||||
model_name='pageviewrestriction',
|
model_name='pageviewrestriction',
|
||||||
name='page',
|
name='page',
|
||||||
field=models.ForeignKey(related_name='view_restrictions', verbose_name='page', to='wagtailcore.Page'),
|
field=models.ForeignKey(verbose_name='Page', related_name='view_restrictions', to='wagtailcore.Page'),
|
||||||
preserve_default=True,
|
preserve_default=True,
|
||||||
),
|
),
|
||||||
migrations.AlterField(
|
migrations.AlterField(
|
||||||
model_name='pageviewrestriction',
|
model_name='pageviewrestriction',
|
||||||
name='password',
|
name='password',
|
||||||
field=models.CharField(max_length=255, verbose_name='password'),
|
field=models.CharField(max_length=255, verbose_name='Password'),
|
||||||
preserve_default=True,
|
preserve_default=True,
|
||||||
),
|
),
|
||||||
migrations.AlterField(
|
migrations.AlterField(
|
||||||
model_name='site',
|
model_name='site',
|
||||||
name='hostname',
|
name='hostname',
|
||||||
field=models.CharField(max_length=255, verbose_name='hostname', db_index=True),
|
field=models.CharField(db_index=True, max_length=255, verbose_name='Hostname'),
|
||||||
preserve_default=True,
|
preserve_default=True,
|
||||||
),
|
),
|
||||||
migrations.AlterField(
|
migrations.AlterField(
|
||||||
model_name='site',
|
model_name='site',
|
||||||
name='is_default_site',
|
name='is_default_site',
|
||||||
field=models.BooleanField(default=False, help_text='If true, this site will handle requests for all other hostnames that do not have a site entry of their own', verbose_name='is default site'),
|
field=models.BooleanField(default=False, help_text='If true, this site will handle requests for all other hostnames that do not have a site entry of their own', verbose_name='Is default site'),
|
||||||
preserve_default=True,
|
preserve_default=True,
|
||||||
),
|
),
|
||||||
migrations.AlterField(
|
migrations.AlterField(
|
||||||
model_name='site',
|
model_name='site',
|
||||||
name='port',
|
name='port',
|
||||||
field=models.IntegerField(default=80, help_text='Set this to something other than 80 if you need a specific port number to appear in URLs (e.g. development on port 8000). Does not affect request handling (so port forwarding still works).', verbose_name='port'),
|
field=models.IntegerField(default=80, help_text='Set this to something other than 80 if you need a specific port number to appear in URLs (e.g. development on port 8000). Does not affect request handling (so port forwarding still works).', verbose_name='Port'),
|
||||||
preserve_default=True,
|
preserve_default=True,
|
||||||
),
|
),
|
||||||
migrations.AlterField(
|
migrations.AlterField(
|
||||||
model_name='site',
|
model_name='site',
|
||||||
name='root_page',
|
name='root_page',
|
||||||
field=models.ForeignKey(related_name='sites_rooted_here', verbose_name='root page', to='wagtailcore.Page'),
|
field=models.ForeignKey(verbose_name='Root page', related_name='sites_rooted_here', to='wagtailcore.Page'),
|
||||||
preserve_default=True,
|
preserve_default=True,
|
||||||
),
|
),
|
||||||
]
|
]
|
||||||
|
|
|
@ -50,10 +50,10 @@ class SiteManager(models.Manager):
|
||||||
|
|
||||||
@python_2_unicode_compatible
|
@python_2_unicode_compatible
|
||||||
class Site(models.Model):
|
class Site(models.Model):
|
||||||
hostname = models.CharField(verbose_name=_('hostname'), max_length=255, db_index=True)
|
hostname = models.CharField(verbose_name=_('Hostname'), max_length=255, db_index=True)
|
||||||
port = models.IntegerField(verbose_name=_('port'), default=80, help_text=_("Set this to something other than 80 if you need a specific port number to appear in URLs (e.g. development on port 8000). Does not affect request handling (so port forwarding still works)."))
|
port = models.IntegerField(verbose_name=_('Port'), default=80, help_text=_("Set this to something other than 80 if you need a specific port number to appear in URLs (e.g. development on port 8000). Does not affect request handling (so port forwarding still works)."))
|
||||||
root_page = models.ForeignKey('Page', verbose_name=_('root page'), related_name='sites_rooted_here')
|
root_page = models.ForeignKey('Page', verbose_name=_('Root page'), related_name='sites_rooted_here')
|
||||||
is_default_site = models.BooleanField(verbose_name=_('is default site'), default=False, help_text=_("If true, this site will handle requests for all other hostnames that do not have a site entry of their own"))
|
is_default_site = models.BooleanField(verbose_name=_('Is default site'), default=False, help_text=_("If true, this site will handle requests for all other hostnames that do not have a site entry of their own"))
|
||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
unique_together = ('hostname', 'port')
|
unique_together = ('hostname', 'port')
|
||||||
|
@ -263,8 +263,8 @@ class PageBase(models.base.ModelBase):
|
||||||
|
|
||||||
@python_2_unicode_compatible
|
@python_2_unicode_compatible
|
||||||
class Page(six.with_metaclass(PageBase, MP_Node, ClusterableModel, index.Indexed)):
|
class Page(six.with_metaclass(PageBase, MP_Node, ClusterableModel, index.Indexed)):
|
||||||
title = models.CharField(verbose_name=_('title'), max_length=255, help_text=_("The page title as you'd like it to be seen by the public"))
|
title = models.CharField(verbose_name=_('Title'), max_length=255, help_text=_("The page title as you'd like it to be seen by the public"))
|
||||||
slug = models.SlugField(verbose_name=_('slug'), max_length=255, help_text=_("The name of the page as it will appear in URLs e.g http://domain.com/blog/[my-slug]/"))
|
slug = models.SlugField(verbose_name=_('Slug'), max_length=255, help_text=_("The name of the page as it will appear in URLs e.g http://domain.com/blog/[my-slug]/"))
|
||||||
# TODO: enforce uniqueness on slug field per parent (will have to be done at the Django
|
# TODO: enforce uniqueness on slug field per parent (will have to be done at the Django
|
||||||
# level rather than db, since there is no explicit parent relation in the db)
|
# level rather than db, since there is no explicit parent relation in the db)
|
||||||
content_type = models.ForeignKey('contenttypes.ContentType', related_name='pages')
|
content_type = models.ForeignKey('contenttypes.ContentType', related_name='pages')
|
||||||
|
@ -273,9 +273,9 @@ class Page(six.with_metaclass(PageBase, MP_Node, ClusterableModel, index.Indexed
|
||||||
url_path = models.CharField(max_length=255, blank=True, editable=False)
|
url_path = models.CharField(max_length=255, blank=True, editable=False)
|
||||||
owner = models.ForeignKey(settings.AUTH_USER_MODEL, null=True, blank=True, editable=False, on_delete=models.SET_NULL, related_name='owned_pages')
|
owner = models.ForeignKey(settings.AUTH_USER_MODEL, null=True, blank=True, editable=False, on_delete=models.SET_NULL, related_name='owned_pages')
|
||||||
|
|
||||||
seo_title = models.CharField(verbose_name=_("page title"), max_length=255, blank=True, help_text=_("Optional. 'Search Engine Friendly' title. This will appear at the top of the browser window."))
|
seo_title = models.CharField(verbose_name=_("Page title"), max_length=255, blank=True, help_text=_("Optional. 'Search Engine Friendly' title. This will appear at the top of the browser window."))
|
||||||
show_in_menus = models.BooleanField(verbose_name=_('show in menus'), default=False, help_text=_("Whether a link to this page will appear in automatically generated menus"))
|
show_in_menus = models.BooleanField(verbose_name=_('Show in menus'), default=False, help_text=_("Whether a link to this page will appear in automatically generated menus"))
|
||||||
search_description = models.TextField(verbose_name=_('search description'), blank=True)
|
search_description = models.TextField(verbose_name=_('Search description'), blank=True)
|
||||||
|
|
||||||
go_live_at = models.DateTimeField(verbose_name=_("Go live date/time"), help_text=_("Please add a date-time in the form YYYY-MM-DD hh:mm."), blank=True, null=True)
|
go_live_at = models.DateTimeField(verbose_name=_("Go live date/time"), help_text=_("Please add a date-time in the form YYYY-MM-DD hh:mm."), blank=True, null=True)
|
||||||
expire_at = models.DateTimeField(verbose_name=_("Expiry date/time"), help_text=_("Please add a date-time in the form YYYY-MM-DD hh:mm."), blank=True, null=True)
|
expire_at = models.DateTimeField(verbose_name=_("Expiry date/time"), help_text=_("Please add a date-time in the form YYYY-MM-DD hh:mm."), blank=True, null=True)
|
||||||
|
@ -1171,9 +1171,9 @@ PAGE_PERMISSION_TYPE_CHOICES = [
|
||||||
|
|
||||||
|
|
||||||
class GroupPagePermission(models.Model):
|
class GroupPagePermission(models.Model):
|
||||||
group = models.ForeignKey(Group, verbose_name=_('group'), related_name='page_permissions')
|
group = models.ForeignKey(Group, verbose_name=_('Group'), related_name='page_permissions')
|
||||||
page = models.ForeignKey('Page', verbose_name=_('page'), related_name='group_permissions')
|
page = models.ForeignKey('Page', verbose_name=_('Page'), related_name='group_permissions')
|
||||||
permission_type = models.CharField(verbose_name=_('permission type'), max_length=20, choices=PAGE_PERMISSION_TYPE_CHOICES)
|
permission_type = models.CharField(verbose_name=_('Permission type'), max_length=20, choices=PAGE_PERMISSION_TYPE_CHOICES)
|
||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
unique_together = ('group', 'page', 'permission_type')
|
unique_together = ('group', 'page', 'permission_type')
|
||||||
|
@ -1398,5 +1398,5 @@ class PagePermissionTester(object):
|
||||||
|
|
||||||
|
|
||||||
class PageViewRestriction(models.Model):
|
class PageViewRestriction(models.Model):
|
||||||
page = models.ForeignKey('Page', verbose_name=_('page'), related_name='view_restrictions')
|
page = models.ForeignKey('Page', verbose_name=_('Page'), related_name='view_restrictions')
|
||||||
password = models.CharField(verbose_name=_('password'), max_length=255)
|
password = models.CharField(verbose_name=_('Password'), max_length=255)
|
||||||
|
|
|
@ -14,19 +14,19 @@ class Migration(migrations.Migration):
|
||||||
migrations.AlterField(
|
migrations.AlterField(
|
||||||
model_name='userprofile',
|
model_name='userprofile',
|
||||||
name='approved_notifications',
|
name='approved_notifications',
|
||||||
field=models.BooleanField(default=True, help_text='Receive notification when your page edit is approved', verbose_name='approved notifications'),
|
field=models.BooleanField(default=True, help_text='Receive notification when your page edit is approved', verbose_name='Approved notifications'),
|
||||||
preserve_default=True,
|
preserve_default=True,
|
||||||
),
|
),
|
||||||
migrations.AlterField(
|
migrations.AlterField(
|
||||||
model_name='userprofile',
|
model_name='userprofile',
|
||||||
name='rejected_notifications',
|
name='rejected_notifications',
|
||||||
field=models.BooleanField(default=True, help_text='Receive notification when your page edit is rejected', verbose_name='rejected notifications'),
|
field=models.BooleanField(default=True, help_text='Receive notification when your page edit is rejected', verbose_name='Rejected notifications'),
|
||||||
preserve_default=True,
|
preserve_default=True,
|
||||||
),
|
),
|
||||||
migrations.AlterField(
|
migrations.AlterField(
|
||||||
model_name='userprofile',
|
model_name='userprofile',
|
||||||
name='submitted_notifications',
|
name='submitted_notifications',
|
||||||
field=models.BooleanField(default=True, help_text='Receive notification when a page is submitted for moderation', verbose_name='submitted notifications'),
|
field=models.BooleanField(default=True, help_text='Receive notification when a page is submitted for moderation', verbose_name='Submitted notifications'),
|
||||||
preserve_default=True,
|
preserve_default=True,
|
||||||
),
|
),
|
||||||
]
|
]
|
||||||
|
|
|
@ -11,19 +11,19 @@ class UserProfile(models.Model):
|
||||||
user = models.OneToOneField(settings.AUTH_USER_MODEL)
|
user = models.OneToOneField(settings.AUTH_USER_MODEL)
|
||||||
|
|
||||||
submitted_notifications = models.BooleanField(
|
submitted_notifications = models.BooleanField(
|
||||||
verbose_name=_('submitted notifications'),
|
verbose_name=_('Submitted notifications'),
|
||||||
default=True,
|
default=True,
|
||||||
help_text=_("Receive notification when a page is submitted for moderation")
|
help_text=_("Receive notification when a page is submitted for moderation")
|
||||||
)
|
)
|
||||||
|
|
||||||
approved_notifications = models.BooleanField(
|
approved_notifications = models.BooleanField(
|
||||||
verbose_name=_('approved notifications'),
|
verbose_name=_('Approved notifications'),
|
||||||
default=True,
|
default=True,
|
||||||
help_text=_("Receive notification when your page edit is approved")
|
help_text=_("Receive notification when your page edit is approved")
|
||||||
)
|
)
|
||||||
|
|
||||||
rejected_notifications = models.BooleanField(
|
rejected_notifications = models.BooleanField(
|
||||||
verbose_name=_('rejected notifications'),
|
verbose_name=_('Rejected notifications'),
|
||||||
default=True,
|
default=True,
|
||||||
help_text=_("Receive notification when your page edit is rejected")
|
help_text=_("Receive notification when your page edit is rejected")
|
||||||
)
|
)
|
||||||
|
|
Ładowanie…
Reference in New Issue