Skip to content
This repository was archived by the owner on Apr 24, 2025. It is now read-only.

Commit c630c1f

Browse files
authored
Merge pull request #20 from Work4Labs/mvdb/meta-verbose-name-plural
Mvdb/meta verbose name plural
2 parents e8fc510 + 2009fb3 commit c630c1f

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

mongodbforms/documentoptions.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ class DocumentMetaWrapper(MutableMapping):
103103
model = None
104104
_app_config = None
105105
_verbose_name = None
106+
_verbose_name_plural = None
106107
has_auto_field = False
107108
object_name = None
108109
proxy = []
@@ -259,7 +260,9 @@ def verbose_name_raw(self):
259260

260261
@property
261262
def verbose_name_plural(self):
262-
return "%ss" % self.verbose_name
263+
if self._verbose_name_plural is None:
264+
self._verbose_name_plural = self._meta.get('verbose_name_plural') or "{}s".format(self.verbose_name)
265+
return self._verbose_name_plural
263266

264267
@property
265268
def db_table(self):

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ def convert_readme():
1616

1717
setup(
1818
name='django-mongoengine-forms',
19-
version='0.4.1.8',
19+
version='0.4.1.9',
2020
description="An implementation of django forms using mongoengine.",
2121
author='Thom Wiggers',
2222
author_email='thom@thomwiggers.nl',

0 commit comments

Comments
 (0)