X-Git-Url: https://git.mdrn.pl/edumed.git/blobdiff_plain/e76fdcf2a2488b1787c74fe8dccfa38d7ac04c84..2b5915c86273728f6f1936f2c4e704edc6d19222:/curriculum/models.py?ds=inline diff --git a/curriculum/models.py b/curriculum/models.py index 399536b..debc487 100644 --- a/curriculum/models.py +++ b/curriculum/models.py @@ -28,6 +28,9 @@ class Competence(models.Model): def __unicode__(self): return self.name + def for_level(self, level): + return self.competencelevel_set.get(level=level) + class Level(models.Model): name = models.CharField(_('name'), max_length=255) slug = models.SlugField(_('slug'))