1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
from django.contrib import admin
from archweb_dev.main.models import (AltForum, Arch, Donor, Mirror, Package, Press, Repo)
class AltForumAdmin(admin.ModelAdmin):
list_display = ('language', 'name')
list_filter = ('language',)
ordering = ['name']
search_fields = ('name',)
class DonorAdmin(admin.ModelAdmin):
ordering = ['name']
search_fields = ('name',)
class MirrorAdmin(admin.ModelAdmin):
list_display = ('domain', 'country')
list_filter = ('country',)
ordering = ['domain']
search_fields = ('domain',)
class PackageAdmin(admin.ModelAdmin):
list_display = ('pkgname', '_reponame', '_archname', '_maintainername')
list_filter = ('repo', 'arch', 'maintainer')
ordering = ['pkgname']
search_fields = ('pkgname',)
class PressAdmin(admin.ModelAdmin):
list_display = ('name', 'url')
ordering = ['name']
search_fields = ('name',)
admin.site.register(AltForum, AltForumAdmin)
admin.site.register(Donor, DonorAdmin)
admin.site.register(Mirror, MirrorAdmin)
admin.site.register(Package, PackageAdmin)
admin.site.register(Press, PressAdmin)
admin.site.register(Arch)
admin.site.register(Repo)
|