You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
35 lines
1.2 KiB
35 lines
1.2 KiB
from django.contrib import admin
|
|
from django.contrib.auth import get_user_model
|
|
from django.contrib.auth.admin import UserAdmin as BaseUserAdmin
|
|
from django.utils.translation import gettext_lazy as _
|
|
|
|
from .models import AuthorRequest
|
|
|
|
User = get_user_model()
|
|
|
|
|
|
@admin.register(User)
|
|
class UserAdmin(BaseUserAdmin):
|
|
fieldsets = (
|
|
(None, {'fields': ('username', 'password')}),
|
|
(_('Personal info'), {'fields': ('first_name', 'last_name', 'email', 'gender', 'about', 'photo')}),
|
|
('Facebook Auth data', {'fields': ('fb_id', 'fb_data', 'is_email_proved')}),
|
|
(_('Permissions'), {'fields': ('role', 'is_active', 'is_staff', 'is_superuser',
|
|
'groups', 'user_permissions')}),
|
|
(_('Important dates'), {'fields': ('last_login', 'date_joined')}),
|
|
('Social urls', {'fields': ('instagram', 'facebook', 'twitter', 'pinterest', 'youtube', 'vkontakte', )}),
|
|
)
|
|
|
|
|
|
@admin.register(AuthorRequest)
|
|
class AuthorRequestAdmin(admin.ModelAdmin):
|
|
list_display = (
|
|
'email',
|
|
'first_name',
|
|
'last_name',
|
|
'status',
|
|
'accepted_send_at',
|
|
'declined_send_at',
|
|
'created_at',
|
|
'update_at',
|
|
)
|
|
|