mirror of
https://github.com/postgres/pgweb.git
synced 2025-08-06 09:57:57 +00:00
22 lines
777 B
Python
22 lines
777 B
Python
from django.contrib import admin
|
|
from util.admin import register_markdown, MarkdownPreviewAdmin
|
|
from models import *
|
|
|
|
class MirrorAdmin(admin.ModelAdmin):
|
|
list_display = ('__unicode__', 'country_name', 'country_code', 'mirror_index', 'mirror_last_rsync', 'host_sponsor', )
|
|
list_filter = ('country_name', 'mirror_active', )
|
|
search_fields = ('country_name', 'host_sponsor', 'host_notes', )
|
|
ordering = ('country_code', )
|
|
|
|
class ProductAdmin(MarkdownPreviewAdmin):
|
|
list_display = ('name', 'publisher', 'approved', 'lastconfirmed',)
|
|
list_filter = ('approved',)
|
|
search_fields = ('name', 'description', )
|
|
ordering = ('name', )
|
|
|
|
admin.site.register(Mirror, MirrorAdmin)
|
|
admin.site.register(Category)
|
|
admin.site.register(LicenceType)
|
|
admin.site.register(Product, ProductAdmin)
|
|
|