2020-01-21 06:35:58 +00:00
|
|
|
from django.views.generic import DetailView
|
|
|
|
|
|
|
|
from judge.models import License
|
|
|
|
from judge.utils.views import TitleMixin
|
|
|
|
|
|
|
|
|
|
|
|
class LicenseDetail(TitleMixin, DetailView):
|
|
|
|
model = License
|
2022-05-14 17:57:27 +00:00
|
|
|
slug_field = slug_url_kwarg = "key"
|
|
|
|
context_object_name = "license"
|
|
|
|
template_name = "license.html"
|
2020-01-21 06:35:58 +00:00
|
|
|
|
|
|
|
def get_title(self):
|
|
|
|
return self.object.name
|