pedagogy: complete CRUD for UV model

This commit is contained in:
2019-06-16 00:04:36 +02:00
parent ec33311715
commit ab344ba02f
4 changed files with 81 additions and 5 deletions

View File

@ -44,8 +44,14 @@ class UV(models.Model):
return user.is_in_group(settings.SITH_GROUP_PEDAGOGY_ADMIN_ID)
def can_be_viewed_by(self, user):
"""
Only visible by subscribers
"""
return user.is_subscribed
def __str__(self):
return self.code
code = models.CharField(
_("code"),
max_length=10,