<s> from django . db import models <EOL> from django . db . models import Q <EOL> from django . conf import settings <EOL> from django . contrib . admin . utils import quote <EOL> from django . contrib . admin . models import LogEntry <EOL> from django . utils . timezone import now <EOL> from django . utils . translation import ugettext_lazy as _ <EOL> from sellmo . utils . mixin import ModelMixin <EOL> class LogEntryMixin ( ModelMixin ) : <EOL> model = LogEntry <EOL> def get_admin_url ( self ) : <EOL> if self . content_type and self . object_id : <EOL> model = self . content_type . model_class ( ) <EOL> if hasattr ( model , '<STR_LIT>' ) : <EOL> return model . get_admin_url ( <EOL> content_type = self . content_type , object_id = self . object_id ) <EOL> return ( <EOL> "<STR_LIT>" <EOL> . format ( <EOL> self . content_type . app_label , <EOL> self . content_type . model , <EOL> quote ( self . object_id ) ) ) <EOL> return None </s>
