from django.contrib import admin
from .models import Vote

@admin.register(Vote)
class VoteAdmin(admin.ModelAdmin):
    list_display = ('voter_hash', 'categorie', 'candidat', 'timestamp')
    readonly_fields = ('voter_hash', 'evenement', 'categorie', 'candidat', 'timestamp')
    def has_add_permission(self, request): return False
    def has_change_permission(self, request, obj=None): return False