# -*- coding: utf-8 -*-
from __future__ import unicode_literals

from django.contrib import admin

from .models import (
    Cookie,
    CookieGroup,
    LogItem,
)


class LogItemAdmin(admin.ModelAdmin):
    list_display = ('action', 'cookiegroup', 'version', 'created')
    list_filter = ('action', 'cookiegroup')


admin.site.register(LogItem, LogItemAdmin)
admin.site.register(Cookie)
admin.site.register(CookieGroup)

@@ -160,16 +160,578 @@
 em,%0A)%0A%0A%0A
+class CookieAdmin(admin.ModelAdmin):%0A    list_display = ('varname', 'name', 'cookiegroup', 'path', 'domain',%0A                    'get_version')%0A    search_fields = ('name', 'domain', 'cookiegroup__varname',%0A                     'cookiegroup__name')%0A    readonly_fields = ('varname',)%0A    list_filter = ('cookiegroup',)%0A%0A%0Aclass CookieGroupAdmin(admin.ModelAdmin):%0A    list_display = ('varname', 'name', 'is_required', 'is_deletable',%0A                    'get_version')%0A    search_fields = ('varname', 'name',)%0A    list_filter = ('is_required', 'is_deletable',)%0A%0A%0A
 class Lo
@@ -871,16 +871,117 @@
 group')%0A
+    readonly_fields = ('action', 'cookiegroup', 'version', 'created')%0A    date_hierarchy = 'created'%0A
 %0A%0Aadmin.
@@ -998,24 +998,22 @@
 ter(
-LogItem, LogItem
+Cookie, Cookie
 Admi
@@ -1041,16 +1041,39 @@
 r(Cookie
+Group, CookieGroupAdmin
 )%0Aadmin.
@@ -1086,21 +1086,31 @@
 egister(
-CookieGroup
+LogItem, LogItemAdmin
 )%0A

tweak admin