# Path: poetry/apps/corpus/models.py
# class MarkupVersion(Model):
#     name = CharField("Имя версии разметки", max_length=50, blank=False)
#     additional = TextField("Дополнительная ифнормация", blank=True)
#     is_manual = BooleanField("Ручные разметки?", default=False)
# 
#     class Meta:
#         verbose_name = "Версия разметки"
#         verbose_name_plural = "Версии разметки"
# 
#     def __str__(self):
#         return str(self.name)
# 
#     def count_markups(self):
#         return self.markups.count()


from django.views.generic import ListView
from braces.views import LoginRequiredMixin, GroupRequiredMixin
from poetry.apps.corpus.models import MarkupVersion



class MarkupVersionListView(LoginRequiredMixin, GroupRequiredMixin, ListView):
    model = MarkupVersion
    template_name = 'versions.html'

# Path: poetry/apps/corpus/models.py
# class MarkupVersion(Model):
#     name = CharField("Имя версии разметки", max_length=50, blank=False)
#     additional = TextField("Дополнительная ифнормация", blank=True)
#     is_manual = BooleanField("Ручные разметки?", default=False)
# 
#     class Meta:
#         verbose_name = "Версия разметки"
#         verbose_name_plural = "Версии разметки"
# 
#     def __str__(self):
#         return str(self.name)
# 
#     def count_markups(self):
#         return self.markups.count()


# Path: poetry/apps/corpus/views/version_list_view.py
from django.views.generic import ListView
from braces.views import LoginRequiredMixin, GroupRequiredMixin
from poetry.apps.corpus.models import MarkupVersion




class MarkupVersionListView(LoginRequiredMixin, GroupRequiredMixin, ListView):
    model = MarkupVersion
    template_name = 'versions.html'

    context_object_name = 'versions'