from django.contrib import admin

from .models import Election

class ElectionAdmin(admin.ModelAdmin):
    def has_add_permission(self, request):
        return False

    readonly_fields = (
        'election_id',
        'tmp_election_id',
        'election_type',
        'election_subtype',
        'poll_open_date',
        'organisation',
        'elected_role',
        'division',
        'seats_contested',
        'seats_total',
        'group',
    )

admin.site.register(Election, ElectionAdmin)

@@ -26,16 +26,68 @@
 t admin%0A
+from django_markdown.admin import MarkdownModelAdmin
 %0Afrom .m
@@ -107,16 +107,29 @@
 Election
+, Explanation
 %0A%0Aclass 
@@ -566,8 +566,61 @@
 nAdmin)%0A
+admin.site.register(Explanation, MarkdownModelAdmin)%0A

allow explainers to be set in admin interface