
from django import forms
from django.contrib import admin

from request_signer.models import AuthorizedClient


class AuthorizedClientForm(forms.ModelForm):

    def __init__(self, *args, **kwargs):
        super(AuthorizedClientForm, self).__init__(*args, **kwargs)
        self.fields['private_key'].widget.attrs['style'] = 'width: 300px; background-color: #ccc;'

    class Meta(object):
        model = AuthorizedClient
        fields = ['private_key']


class AuthorizedClientAdmin(admin.ModelAdmin):
    list_display = ['client_id', 'is_active', 'created', 'updated']
    fields = ['client_id', 'private_key', 'is_active']
    form = AuthorizedClientForm


admin.site.register(AuthorizedClient, AuthorizedClientAdmin)

@@ -338,32 +338,8 @@
 0px;
- background-color: #ccc;
 '%0A%0A 
@@ -508,16 +508,31 @@
 ent_id',
+ 'private_key',
  'is_act

add private_key to list view