Added function 'set_namespace_title' to define a translatable title for a permission group namespace

This commit is contained in:
Roberto Rosario
2011-05-25 00:32:47 -04:00
parent 53cb857a8f
commit 89685fb8c6
9 changed files with 33 additions and 17 deletions

View File

@@ -2,7 +2,7 @@ from django.utils.translation import ugettext_lazy as _
from navigation.api import register_links, \
register_model_list_columns
from permissions.api import register_permission
from permissions.api import register_permission, set_namespace_title
from django.contrib.comments.models import Comment
@@ -12,6 +12,7 @@ PERMISSION_COMMENT_CREATE = {'namespace': 'comments', 'name': 'comment_create',
PERMISSION_COMMENT_DELETE = {'namespace': 'comments', 'name': 'comment_delete', 'label': _(u'Delete comments')}
PERMISSION_COMMENT_EDIT = {'namespace': 'comments', 'name': 'comment_edit', 'label': _(u'Edit comments')}
set_namespace_title('comments', _(u'comments'))
register_permission(PERMISSION_COMMENT_CREATE)
register_permission(PERMISSION_COMMENT_DELETE)
register_permission(PERMISSION_COMMENT_EDIT)