<s> from django . contrib import admin <EOL> from . models import AccessToken , AuthorizationCode , AuthorizationToken , Client , RedirectUri , RefreshToken , Scope <EOL> class AccessTokenAdmin ( admin . ModelAdmin ) : <EOL> list_display = ( "<STR_LIT>" , "<STR_LIT:user>" , "<STR_LIT>" , "<STR_LIT>" , ) <EOL> list_filter = ( "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , ) <EOL> def truncated_refresh_token ( self , obj ) : <EOL> return obj . refresh_token . token [ <NUM_LIT:0> : <NUM_LIT> ] + "<STR_LIT>" <EOL> truncated_refresh_token . short_description = "<STR_LIT>" <EOL> def truncated_token ( self , obj ) : <EOL> return obj . token [ <NUM_LIT:0> : <NUM_LIT> ] + "<STR_LIT>" <EOL> truncated_token . short_description = "<STR_LIT>" <EOL> class AuthorizationCodeAdmin ( admin . ModelAdmin ) : <EOL> list_display = ( "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , ) <EOL> list_filter = ( "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , ) <EOL> def truncated_token ( self , obj ) : <EOL> return obj . token [ <NUM_LIT:0> : <NUM_LIT:50> ] + "<STR_LIT>" <EOL> truncated_token . short_description = "<STR_LIT>" <EOL> class AuthorizationTokenAdmin ( admin . ModelAdmin ) : <EOL> list_display = ( "<STR_LIT>" , "<STR_LIT:user>" , "<STR_LIT>" ) <EOL> list_filter = ( "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , ) <EOL> def truncated_token ( self , obj ) : <EOL> return obj . token [ <NUM_LIT:0> : <NUM_LIT> ] + "<STR_LIT>" <EOL> truncated_token . short_description = "<STR_LIT>" <EOL> class ClientAdmin ( admin . ModelAdmin ) : <EOL> list_display = ( "<STR_LIT:name>" , "<STR_LIT>" , "<STR_LIT>" , ) <EOL> list_filter = ( "<STR_LIT>" , ) <EOL> class RedirectUriAdmin ( admin . ModelAdmin ) : <EOL> list_display = ( "<STR_LIT>" , "<STR_LIT:url>" , ) <EOL> class RefreshTokenAdmin ( admin . ModelAdmin ) : <EOL> list_display = ( "<STR_LIT>" , "<STR_LIT:user>" , "<STR_LIT>" , "<STR_LIT>" , ) <EOL> list_filter = ( "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , ) <EOL> def truncated_authorization_token ( self , obj ) : <EOL> return obj . authorization_token . token [ <NUM_LIT:0> : <NUM_LIT> ] + "<STR_LIT>" <EOL> truncated_authorization_token . short_description = "<STR_LIT>" <EOL> def truncated_token ( self , obj ) : <EOL> return obj . token [ <NUM_LIT:0> : <NUM_LIT> ] + "<STR_LIT>" <EOL> truncated_token . short_description = "<STR_LIT>" <EOL> class ScopeAdmin ( admin . ModelAdmin ) : <EOL> list_display = ( "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT:description>" , ) <EOL> admin . site . register ( AccessToken , AccessTokenAdmin ) <EOL> admin . site . register ( AuthorizationCode , AuthorizationCodeAdmin ) <EOL> admin . site . register ( AuthorizationToken , AuthorizationTokenAdmin ) <EOL> admin . site . register ( Client , ClientAdmin ) <EOL> admin . site . register ( RedirectUri , RedirectUriAdmin ) <EOL> admin . site . register ( RefreshToken , RefreshTokenAdmin ) <EOL> admin . site . register ( Scope , ScopeAdmin ) </s>
