Merge branch 'certificate'
Some checks failed
Deploy to Production / build-and-deploy (push) Failing after 47s
Some checks failed
Deploy to Production / build-and-deploy (push) Failing after 47s
This commit is contained in:
@@ -11,3 +11,4 @@ from .report import * # noqa
|
||||
from .request import * # noqa
|
||||
from .valuation import * # noqa
|
||||
from .vehicle import * # noqa
|
||||
from .certificate import * # noqa
|
||||
|
||||
20
core/apps/evaluation/models/certificate.py
Normal file
20
core/apps/evaluation/models/certificate.py
Normal file
@@ -0,0 +1,20 @@
|
||||
from django.db import models
|
||||
from django_core.models import AbstractBaseModel
|
||||
from model_bakery import baker
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
|
||||
class CertificateModel(AbstractBaseModel):
|
||||
title = models.CharField(verbose_name=_("title"), max_length=255, blank=False, null=False)
|
||||
file_url = models.URLField(verbose_name=_("file url"), max_length=255, blank=False, null=False)
|
||||
|
||||
def __str__(self):
|
||||
return self.title
|
||||
|
||||
@classmethod
|
||||
def _baker(cls):
|
||||
return baker.make(cls)
|
||||
|
||||
class Meta:
|
||||
db_table = "certificate"
|
||||
verbose_name = _("Certificate")
|
||||
verbose_name_plural = _("Certificates")
|
||||
Reference in New Issue
Block a user