from .models import Employee, Role
from django import forms
from django.contrib import admin
from django.contrib.auth.admin import UserAdmin as BaseUserAdmin
from django.contrib.auth.forms import ReadOnlyPasswordHashField


class UserChangeForm(forms.ModelForm):
    password = ReadOnlyPasswordHashField()

    class Meta:
        model = Employee
        fields = ('email',)

    def clean_password(self):
        return self.initial['password']

class RoleAdmin(admin.ModelAdmin):
    list_display = ("name",)


class EmployeeAdmin(BaseUserAdmin):
    form = UserChangeForm
    list_display = ("username", "first_name", "last_name", "email", 'level', 'score',)
    fieldsets = (
        (None, {'fields': ('username', 'email', 'password')}),
        ('Personal info', {'fields': ('first_name',
                                      'last_name',
                                      'role',
                                      'skype_id',
                                      'avatar',
                                      'categories')}),
        ('Personal score', {'fields': ('last_month_score',
                                       'current_month_score',
                                       'level',
                                       'score')}),
        ('Permissions', {'fields': ('groups',
                                    'user_permissions',
                                    'is_superuser',
                                    'is_staff',
                                    'is_active',)}),
        ('History', {'fields': ('date_joined', 'last_login')})
    )

admin.site.register(Employee, EmployeeAdmin)
admin.site.register(Role, RoleAdmin)

@@ -297,16 +297,336 @@
 shField(
+label= (%22Password%22),%0A                                         help_text= (%22Raw passwords are not stored, so there is no way to see %22%0A                                         %22this user's password, but you can change the password using %22%0A                                         %22%3Ca href=%5C'../password/%5C'%3Ethis form%3C/a%3E.%22)
 )%0A%0A    c

Add password change form to user admin page.