Files
mayan-edms/mayan/apps/common/managers.py
Roberto Rosario ec223dd54d PEP8 cleanups.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2017-08-27 02:08:39 -04:00

14 lines
421 B
Python

from __future__ import unicode_literals
from django.apps import apps
from django.contrib.contenttypes.fields import GenericRelation
from django.db import models
class ErrorLogEntryManager(models.Manager):
def register(self, model):
ErrorLogEntry = apps.get_model(
app_label='common', model_name='ErrorLogEntry'
)
model.add_to_class('error_logs', GenericRelation(ErrorLogEntry))