a Django-based indieweb.org site https://00dani.me/
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.
 
 
 
 

31 lines
675 B

from django.contrib import admin
from django.contrib.auth.admin import UserAdmin as BaseUserAdmin
from .models import Key, Profile, Site, User
class SiteAdmin(admin.ModelAdmin):
list_display = ('name', 'icon', 'domain', 'url_template')
class KeyInline(admin.TabularInline):
model = Key
extra = 1
class ProfileInline(admin.TabularInline):
model = Profile
extra = 1
class UserAdmin(BaseUserAdmin):
fieldsets = BaseUserAdmin.fieldsets + (
('Profile', {'fields': ('avatar', 'xmpp', 'note')}),
)
inlines = (
KeyInline,
ProfileInline,
)
admin.site.register(Site, SiteAdmin)
admin.site.register(User, UserAdmin)