Commit d1b1976a authored by Matheus Miranda's avatar Matheus Miranda
Browse files

Add translation for certificate template

parent 6d25b2bc
# Generated by Django 2.2.23 on 2021-05-20 20:24
import courses.utils
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('certification', '0005_auto_20210520_1126'),
]
operations = [
migrations.AddField(
model_name='certificatetemplate',
name='base_logo_en',
field=models.ImageField(blank=True, null=True, upload_to=courses.utils.HashName('base_logo', 'organization_name'), verbose_name='Logo'),
),
migrations.AddField(
model_name='certificatetemplate',
name='base_logo_es',
field=models.ImageField(blank=True, null=True, upload_to=courses.utils.HashName('base_logo', 'organization_name'), verbose_name='Logo'),
),
migrations.AddField(
model_name='certificatetemplate',
name='base_logo_pt_br',
field=models.ImageField(blank=True, null=True, upload_to=courses.utils.HashName('base_logo', 'organization_name'), verbose_name='Logo'),
),
migrations.AddField(
model_name='certificatetemplate',
name='cert_logo_en',
field=models.ImageField(blank=True, null=True, upload_to=courses.utils.HashName('logo', 'organization_name'), verbose_name='Logo'),
),
migrations.AddField(
model_name='certificatetemplate',
name='cert_logo_es',
field=models.ImageField(blank=True, null=True, upload_to=courses.utils.HashName('logo', 'organization_name'), verbose_name='Logo'),
),
migrations.AddField(
model_name='certificatetemplate',
name='cert_logo_pt_br',
field=models.ImageField(blank=True, null=True, upload_to=courses.utils.HashName('logo', 'organization_name'), verbose_name='Logo'),
),
migrations.AddField(
model_name='certificatetemplate',
name='name_en',
field=models.CharField(blank=True, max_length=255, null=True, verbose_name='Signature Name'),
),
migrations.AddField(
model_name='certificatetemplate',
name='name_es',
field=models.CharField(blank=True, max_length=255, null=True, verbose_name='Signature Name'),
),
migrations.AddField(
model_name='certificatetemplate',
name='name_pt_br',
field=models.CharField(blank=True, max_length=255, null=True, verbose_name='Signature Name'),
),
migrations.AddField(
model_name='certificatetemplate',
name='organization_name_en',
field=models.CharField(blank=True, max_length=255, null=True, verbose_name='Name'),
),
migrations.AddField(
model_name='certificatetemplate',
name='organization_name_es',
field=models.CharField(blank=True, max_length=255, null=True, verbose_name='Name'),
),
migrations.AddField(
model_name='certificatetemplate',
name='organization_name_pt_br',
field=models.CharField(blank=True, max_length=255, null=True, verbose_name='Name'),
),
migrations.AddField(
model_name='certificatetemplate',
name='role_en',
field=models.CharField(blank=True, max_length=128, null=True, verbose_name='Role'),
),
migrations.AddField(
model_name='certificatetemplate',
name='role_es',
field=models.CharField(blank=True, max_length=128, null=True, verbose_name='Role'),
),
migrations.AddField(
model_name='certificatetemplate',
name='role_pt_br',
field=models.CharField(blank=True, max_length=128, null=True, verbose_name='Role'),
),
migrations.AddField(
model_name='certificatetemplate',
name='second_name_en',
field=models.CharField(blank=True, max_length=255, null=True, verbose_name='Second Signature Name'),
),
migrations.AddField(
model_name='certificatetemplate',
name='second_name_es',
field=models.CharField(blank=True, max_length=255, null=True, verbose_name='Second Signature Name'),
),
migrations.AddField(
model_name='certificatetemplate',
name='second_name_pt_br',
field=models.CharField(blank=True, max_length=255, null=True, verbose_name='Second Signature Name'),
),
migrations.AddField(
model_name='certificatetemplate',
name='second_role_en',
field=models.CharField(blank=True, max_length=128, null=True, verbose_name='Second Role'),
),
migrations.AddField(
model_name='certificatetemplate',
name='second_role_es',
field=models.CharField(blank=True, max_length=128, null=True, verbose_name='Second Role'),
),
migrations.AddField(
model_name='certificatetemplate',
name='second_role_pt_br',
field=models.CharField(blank=True, max_length=128, null=True, verbose_name='Second Role'),
),
migrations.AddField(
model_name='certificatetemplate',
name='second_signature_en',
field=models.ImageField(blank=True, null=True, upload_to=courses.utils.HashName('second_signature', 'organization_name'), verbose_name='Second Signature'),
),
migrations.AddField(
model_name='certificatetemplate',
name='second_signature_es',
field=models.ImageField(blank=True, null=True, upload_to=courses.utils.HashName('second_signature', 'organization_name'), verbose_name='Second Signature'),
),
migrations.AddField(
model_name='certificatetemplate',
name='second_signature_pt_br',
field=models.ImageField(blank=True, null=True, upload_to=courses.utils.HashName('second_signature', 'organization_name'), verbose_name='Second Signature'),
),
migrations.AddField(
model_name='certificatetemplate',
name='signature_en',
field=models.ImageField(blank=True, null=True, upload_to=courses.utils.HashName('signature', 'organization_name'), verbose_name='Signature'),
),
migrations.AddField(
model_name='certificatetemplate',
name='signature_es',
field=models.ImageField(blank=True, null=True, upload_to=courses.utils.HashName('signature', 'organization_name'), verbose_name='Signature'),
),
migrations.AddField(
model_name='certificatetemplate',
name='signature_pt_br',
field=models.ImageField(blank=True, null=True, upload_to=courses.utils.HashName('signature', 'organization_name'), verbose_name='Signature'),
),
migrations.AddField(
model_name='certificatetemplate',
name='site_logo_en',
field=models.ImageField(blank=True, null=True, upload_to='certificates_files', verbose_name='Site Logo'),
),
migrations.AddField(
model_name='certificatetemplate',
name='site_logo_es',
field=models.ImageField(blank=True, null=True, upload_to='certificates_files', verbose_name='Site Logo'),
),
migrations.AddField(
model_name='certificatetemplate',
name='site_logo_pt_br',
field=models.ImageField(blank=True, null=True, upload_to='certificates_files', verbose_name='Site Logo'),
),
migrations.AddField(
model_name='certificatetemplate',
name='text_en',
field=models.TextField(default='', null=True, verbose_name='Content'),
),
migrations.AddField(
model_name='certificatetemplate',
name='text_es',
field=models.TextField(default='', null=True, verbose_name='Content'),
),
migrations.AddField(
model_name='certificatetemplate',
name='text_pt_br',
field=models.TextField(default='', null=True, verbose_name='Content'),
),
]
...@@ -2,6 +2,7 @@ from modeltranslation.translator import register, TranslationOptions ...@@ -2,6 +2,7 @@ from modeltranslation.translator import register, TranslationOptions
from .models import Course, Lesson, Unit, ProfessorMessage from .models import Course, Lesson, Unit, ProfessorMessage
from .course_material.models import CourseMaterial, File from .course_material.models import CourseMaterial, File
from .stats.models import AccessibleArea from .stats.models import AccessibleArea
from .certification.models import CertificateTemplate
@register(Course) @register(Course)
...@@ -40,3 +41,10 @@ class FileTranslationOptions(TranslationOptions): ...@@ -40,3 +41,10 @@ class FileTranslationOptions(TranslationOptions):
@register(AccessibleArea) @register(AccessibleArea)
class AccessibleAreaTranslationOptions(TranslationOptions): class AccessibleAreaTranslationOptions(TranslationOptions):
fields = ('name', 'slug') fields = ('name', 'slug')
@register(CertificateTemplate)
class CertificateTemplateTranslationOptions(TranslationOptions):
fields = ('role', 'name', 'second_role', 'second_name', 'cert_logo',
'base_logo', 'signature', 'second_signature', 'site_logo',
'organization_name', 'text')
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