21 lines
679 B
Python
21 lines
679 B
Python
from django.contrib import admin
|
|
from django.contrib.auth.models import User
|
|
from django.db import models
|
|
|
|
from web.models.base import BaseModel
|
|
from web.models.event_comment import EventComment
|
|
|
|
|
|
class EventCommentReaction(BaseModel):
|
|
id = models.AutoField(primary_key=True)
|
|
reaction = models.CharField(default=None, blank=True, max_length=8)
|
|
event_comment = models.ForeignKey(EventComment, on_delete=models.CASCADE)
|
|
submitted_by = models.ForeignKey(User, on_delete=models.CASCADE)
|
|
|
|
class Meta:
|
|
db_table = 'event_comment_reactions'
|
|
|
|
|
|
class EventCommentReactionAdmin(admin.ModelAdmin):
|
|
list_display = ('event_comment', 'reaction', 'submitted_by')
|