Exemplo n.º 1
0
 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()
Exemplo n.º 2
0
	def save(self):
		super().save()
		if self.slug is None:
			self.slug = hashid_encode(self.pk, salt="event", min_length=8)
		super().save()
Exemplo n.º 3
0
 def encoded_url(self):
     return hashid_encode(self.pk)
Exemplo n.º 4
0
 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"])