from django.contrib import admin

from authentication.models import User, Author, Subscription
from django.contrib.auth.admin import UserAdmin as BaseUserAdmin


class CustomUserAdmin(BaseUserAdmin):
    ordering = ('email',)
    list_display = ('email',)
    fieldsets = (
        (None, {'fields': ('email', 'password')}),
        ('Avatar image', {'fields': ('avatar_img',)}),
        ('Permissions', {'fields': ('is_superuser', 'is_staff')}),
    )
    add_fieldsets = (
        (None, {
            'classes': ('wide',),
            'fields': ('email', 'password1', 'password2', 'avatar_img',),
        }),
    )


admin.site.register(User, CustomUserAdmin)
admin.site.register(Author)
admin.site.register(Subscription)

03bf1a12c0c0530499e149ce68d0680841d7a9c3
<mask token>


class CustomUserAdmin(BaseUserAdmin):
    <mask token>
    <mask token>
    <mask token>
    <mask token>


<mask token>

<mask token>


class CustomUserAdmin(BaseUserAdmin):
    ordering = 'email',
    list_display = 'email',
    fieldsets = (None, {'fields': ('email', 'password')}), ('Avatar image',
        {'fields': ('avatar_img',)}), ('Permissions', {'fields': (
        'is_superuser', 'is_staff')})
    add_fieldsets = (None, {'classes': ('wide',), 'fields': ('email',
        'password1', 'password2', 'avatar_img')}),


<mask token>

<mask token>


class CustomUserAdmin(BaseUserAdmin):
    ordering = 'email',
    list_display = 'email',
    fieldsets = (None, {'fields': ('email', 'password')}), ('Avatar image',
        {'fields': ('avatar_img',)}), ('Permissions', {'fields': (
        'is_superuser', 'is_staff')})
    add_fieldsets = (None, {'classes': ('wide',), 'fields': ('email',
        'password1', 'password2', 'avatar_img')}),


admin.site.register(User, CustomUserAdmin)
admin.site.register(Author)
admin.site.register(Subscription)

from django.contrib import admin
from authentication.models import User, Author, Subscription
from django.contrib.auth.admin import UserAdmin as BaseUserAdmin


class CustomUserAdmin(BaseUserAdmin):
    ordering = 'email',
    list_display = 'email',
    fieldsets = (None, {'fields': ('email', 'password')}), ('Avatar image',
        {'fields': ('avatar_img',)}), ('Permissions', {'fields': (
        'is_superuser', 'is_staff')})
    add_fieldsets = (None, {'classes': ('wide',), 'fields': ('email',
        'password1', 'password2', 'avatar_img')}),


admin.site.register(User, CustomUserAdmin)
admin.site.register(Author)
admin.site.register(Subscription)

from django.contrib import admin

from authentication.models import User, Author, Subscription
from django.contrib.auth.admin import UserAdmin as BaseUserAdmin


class CustomUserAdmin(BaseUserAdmin):
    ordering = ('email',)
    list_display = ('email',)
    fieldsets = (
        (None, {'fields': ('email', 'password')}),
        ('Avatar image', {'fields': ('avatar_img',)}),
        ('Permissions', {'fields': ('is_superuser', 'is_staff')}),
    )
    add_fieldsets = (
        (None, {
            'classes': ('wide',),
            'fields': ('email', 'password1', 'password2', 'avatar_img',),
        }),
    )


admin.site.register(User, CustomUserAdmin)
admin.site.register(Author)
admin.site.register(Subscription)
