Commit bd65f027 authored by Laury Bueno's avatar Laury Bueno
Browse files

[Classes] Add a certificate_template to each class

parent 7a31e4c9
...@@ -32,6 +32,13 @@ class Class(models.Model): ...@@ -32,6 +32,13 @@ class Class(models.Model):
_('Certification Allowed Even Without Progress'), _('Certification Allowed Even Without Progress'),
default=False, default=False,
) )
certificate_template = models.ForeignKey(
'certification.CertificateTemplate',
models.SET_NULL,
verbose_name=_('CertificateTemplate'),
related_name='classes',
null=True,
)
def __str__(self): def __str__(self):
return u'%s @ %s' % (self.name, self.course) return u'%s @ %s' % (self.name, self.course)
......
# Generated by Django 2.2.16 on 2020-09-15 20:03
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('certification', '0004_auto_20200703_2023'),
('courses', '0015_auto_20200818_0320'),
]
operations = [
migrations.AddField(
model_name='class',
name='certificate_template',
field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='classes', to='certification.CertificateTemplate', verbose_name='CertificateTemplate'),
),
]
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