<s> """<STR_LIT>""" <EOL> from django . contrib . auth . mixins import ( <EOL> LoginRequiredMixin , <EOL> PermissionRequiredMixin ) <EOL> from djangocrud . core . constants import CRUD_OPERATIONS <EOL> from djangocrud . core . helpers import get_model_name , get_app_name <EOL> class BaseEntityMixin ( object ) : <EOL> """<STR_LIT>""" <EOL> @ property <EOL> def title ( self ) : <EOL> """<STR_LIT>""" <EOL> return self . __class__ . __name__ <EOL> class AuthMixin ( LoginRequiredMixin , PermissionRequiredMixin ) : <EOL> """<STR_LIT>""" <EOL> def get_permission_required ( self ) : <EOL> """<STR_LIT>""" <EOL> return [ '<STR_LIT>' . format ( <EOL> get_app_name ( request = self . request ) , <EOL> CRUD_OPERATIONS [ self . __class__ . __name__ . replace ( <EOL> '<STR_LIT>' , '<STR_LIT>' ) . lower ( ) ] , <EOL> get_model_name ( request = self . request ) . lower ( ) ) ] </s>
