Commit 08bbdcf7 authored by Matheus Miranda's avatar Matheus Miranda
Browse files

Fix template rendering order

parent 8f63d8a0
...@@ -68,9 +68,9 @@ class CourseCertification(models.Model): ...@@ -68,9 +68,9 @@ class CourseCertification(models.Model):
@property @property
def template(self): def template(self):
if self.type == self.TYPES[0][1]: if self.type == self.TYPES[0][1]:
return self.course_student.get_current_class().certificate_template
else:
return self.course_student.get_current_class().receipt_template return self.course_student.get_current_class().receipt_template
else:
return self.course_student.get_current_class().certificate_template
@property @property
def get_approved_process(self): def get_approved_process(self):
...@@ -208,12 +208,6 @@ class CertificateTemplate(models.Model): ...@@ -208,12 +208,6 @@ class CertificateTemplate(models.Model):
('certificate', _('Certificate')), ('certificate', _('Certificate')),
) )
name = models.CharField(
_('Name'),
blank=True,
max_length=255,
null=True,
)
course = models.ForeignKey( course = models.ForeignKey(
Course, Course,
models.CASCADE, models.CASCADE,
...@@ -225,6 +219,12 @@ class CertificateTemplate(models.Model): ...@@ -225,6 +219,12 @@ class CertificateTemplate(models.Model):
blank=True, blank=True,
null=True, null=True,
) )
name = models.CharField(
_('Name'),
blank=True,
max_length=255,
null=True,
)
signature_name = models.CharField( signature_name = models.CharField(
_('Signature Name'), _('Signature Name'),
blank=True, blank=True,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment