Load models by calling AppConfig.get_model method instead.

This commit is contained in:
Roberto Rosario
2016-01-22 03:59:42 -04:00
parent 2f344f299f
commit b19225e95d
16 changed files with 58 additions and 59 deletions

View File

@@ -10,7 +10,6 @@ from navigation import SourceColumn
from .links import (
link_comment_add, link_comment_delete, link_comments_for_document
)
from .models import Comment
from .permissions import (
permission_comment_create, permission_comment_delete,
permission_comment_view
@@ -26,6 +25,8 @@ class DocumentCommentsApp(MayanAppConfig):
def ready(self):
super(DocumentCommentsApp, self).ready()
Comment = self.get_model('Comment')
ModelPermission.register(
model=Document, permissions=(
permission_comment_create, permission_comment_delete,