2010-01-27 01:23:25 +03:00
|
|
|
from django.contrib import admin
|
|
|
|
|
2011-03-17 01:34:32 +03:00
|
|
|
from . import models
|
|
|
|
|
|
|
|
|
|
|
|
ms = models.BlocklistItem, models.BlocklistPlugin, models.BlocklistGfx
|
|
|
|
inlines = [type(cls.__name__ + 'Inline', (admin.StackedInline,),
|
|
|
|
{'model': cls})
|
|
|
|
for cls in ms]
|
|
|
|
|
|
|
|
|
|
|
|
class DetailAdmin(admin.ModelAdmin):
|
|
|
|
inlines = inlines
|
|
|
|
|
|
|
|
admin.site.register(models.BlocklistApp)
|
2011-09-09 07:41:44 +04:00
|
|
|
admin.site.register(models.BlocklistCA)
|
2011-03-17 01:34:32 +03:00
|
|
|
admin.site.register(models.BlocklistItem)
|
|
|
|
admin.site.register(models.BlocklistPlugin)
|
|
|
|
admin.site.register(models.BlocklistGfx)
|
|
|
|
admin.site.register(models.BlocklistDetail, DetailAdmin)
|