# Path: harnas/contest/models.py
# class Contest(models.Model):
#     class Meta:
# class News(models.Model):
#     class Meta:
# class Task(models.Model):
#     class Meta:
# class TaskFilesDirectoryError(Exception):
# class TestCase(models.Model):
# class GroupTaskDetails(models.Model):
#     class Meta:
#     def __str__(self):
#     def __str__(self):
#     def __str__(self):
#     def display_name(self):
# def make_directory_for_task_files(sender, instance, **kwargs):
# def fetch_task_files(task_dir: str, source_task_id: int) -> None:
# def make_task_dir(task_dir: str) -> None:
#     def __str__(self):
#     QUEUED = "QUE"
#     MEMORY_LIMIT = "MEM"
#     TIME_LIMIT = "TLE"
#     ACCEPTED = "OK"
#     INTERNAL_ERROR = "INT"
#     WRONG_ANSWER = "ANS"
#     COMPILATION_ERROR = "CME"
#     RUNTIME_ERROR = "RTE"
#     STATUS_CHOICES = (
#         (QUEUED, "In checking queue"),
#         (MEMORY_LIMIT, "Memory limit exceeded"),
#         (TIME_LIMIT, "Time limit exceeded"),
#         (ACCEPTED, "Accepted"),
#         (INTERNAL_ERROR, "Internal error"),
#         (WRONG_ANSWER, "Wrong answer"),
#         (COMPILATION_ERROR, "Compilation error"),
#         (RUNTIME_ERROR, "Runtime error"),
#     )


from django.contrib import admin
from guardian.admin import GuardedModelAdmin
from harnas.contest import models


class ContestAdmin(GuardedModelAdmin):
    list_display = ('slug', 'name')

admin.site.register(models.Contest, ContestAdmin)


class TaskAdmin(GuardedModelAdmin):
    list_display = ('short_name', 'name', 'author')

admin.site.register(models.Task, TaskAdmin)


class NewsAdmin(GuardedModelAdmin):
    list_display = ('title', 'contest', 'author')


# Path: harnas/contest/models.py
# class Contest(models.Model):
#     class Meta:
# class News(models.Model):
#     class Meta:
# class Task(models.Model):
#     class Meta:
# class TaskFilesDirectoryError(Exception):
# class TestCase(models.Model):
# class GroupTaskDetails(models.Model):
#     class Meta:
#     def __str__(self):
#     def __str__(self):
#     def __str__(self):
#     def display_name(self):
# def make_directory_for_task_files(sender, instance, **kwargs):
# def fetch_task_files(task_dir: str, source_task_id: int) -> None:
# def make_task_dir(task_dir: str) -> None:
#     def __str__(self):
#     QUEUED = "QUE"
#     MEMORY_LIMIT = "MEM"
#     TIME_LIMIT = "TLE"
#     ACCEPTED = "OK"
#     INTERNAL_ERROR = "INT"
#     WRONG_ANSWER = "ANS"
#     COMPILATION_ERROR = "CME"
#     RUNTIME_ERROR = "RTE"
#     STATUS_CHOICES = (
#         (QUEUED, "In checking queue"),
#         (MEMORY_LIMIT, "Memory limit exceeded"),
#         (TIME_LIMIT, "Time limit exceeded"),
#         (ACCEPTED, "Accepted"),
#         (INTERNAL_ERROR, "Internal error"),
#         (WRONG_ANSWER, "Wrong answer"),
#         (COMPILATION_ERROR, "Compilation error"),
#         (RUNTIME_ERROR, "Runtime error"),
#     )


# Path: harnas/contest/admin.py
from django.contrib import admin
from guardian.admin import GuardedModelAdmin
from harnas.contest import models



class ContestAdmin(GuardedModelAdmin):
    list_display = ('slug', 'name')

admin.site.register(models.Contest, ContestAdmin)


class TaskAdmin(GuardedModelAdmin):
    list_display = ('short_name', 'name', 'author')

admin.site.register(models.Task, TaskAdmin)


class NewsAdmin(GuardedModelAdmin):
    list_display = ('title', 'contest', 'author')


admin.site.register(models.News, NewsAdmin)