Refactoring to konova

This commit is contained in:
mipel
2021-07-01 14:38:57 +02:00
parent c14e9466fb
commit 947f50b11c
60 changed files with 103 additions and 17901 deletions

View File

@@ -6,21 +6,3 @@ Created on: 07.12.20
"""
from konova.enums import BaseEnum
class RoleTypeEnum(BaseEnum):
"""
Defines the possible role types for organisation and users
"""
DATAPROVIDER = "DATAPROVIDER"
LICENSINGAUTHORITY = "LICENSINGAUTHORITY"
REGISTRATIONOFFICE = "REGISTRATIONOFFICE"
class OrganisationTypeEnum(BaseEnum):
"""
Defines the possible role types for organisation and users
"""
OFFICIAL = "OFFICIAL"
COMPANY = "COMPANY"
NGO = "NGO"

View File

@@ -1,7 +1,6 @@
from django.db import models
from konova.models import BaseResource
from organisation.enums import OrganisationTypeEnum
class Organisation(BaseResource):
@@ -12,7 +11,6 @@ class Organisation(BaseResource):
phone = models.CharField(max_length=500, null=True, blank=True)
email = models.EmailField(max_length=500, null=True, blank=True)
facsimile = models.CharField(max_length=500, null=True, blank=True)
type = models.CharField(max_length=255, choices=OrganisationTypeEnum.as_choices(drop_empty_choice=True), null=True, blank=True)
def __str__(self):
return self.name
return self.name

View File

@@ -6,17 +6,3 @@ Created on: 07.12.20
"""
from django.utils.translation import gettext_lazy as _
from organisation.enums import OrganisationTypeEnum as ote
from organisation.enums import RoleTypeEnum as rte
ORGANISATION_ROLE_STRINGS = {
ote.OFFICIAL.value: _("Official"),
ote.COMPANY.value: _("Company"),
ote.NGO.value: _("NGO"),
}
ROLE_TYPE_STRINGS = {
rte.DATAPROVIDER.value: _("Data provider"),
rte.LICENSINGAUTHORITY.value: _("Licencing Authority"),
rte.REGISTRATIONOFFICE.value: _("Registration office"),
}