def save(self): if not self.pk: rmarks = self.rubric.marks.all() super().save() for rmark in rmarks: AssessmentMark.objects.create(rubric_mark=rmark, assessment=self) super().save() if not self.slug: self.slug = hashid_encode(self.pk, salt="assessment", min_length=8) super().save()
def save(self): super().save() if self.slug is None: self.slug = hashid_encode(self.pk, salt="event", min_length=8) super().save()
def encoded_url(self): return hashid_encode(self.pk)
def activation_link(self): return imp.urls["portal"] + "/account/activate/" + hashid_encode( self.pk, salt=imp.user_activation_urls["salt"], min_length=imp.user_activation_urls["min_length"])