from datahub.omis.order import models class ServiceTypeFixtures(Fixture): """Metadata fixtures (for the loadinitialmetadata command).""" files = [ 'fixtures/service_types.yaml', ] class CancellationReasonFixtures(Fixture): """Metadata fixtures (for the loadinitialmetadata command).""" files = [ 'fixtures/cancellation_reasons.yaml', ] registry.register( metadata_id='order-service-type', model=models.ServiceType, serializer=ConstantModelSerializer, ) registry.register( metadata_id='order-cancellation-reason', model=models.CancellationReason, serializer=ConstantModelSerializer, )
from datahub.investment.investor_profile import models from datahub.investment.investor_profile.serializers import AssetClassInterestSerializer from datahub.metadata.registry import registry PATH_PREFIX = 'capital-investment' registry.register( metadata_id='asset-class-interest', model=models.AssetClassInterest, serializer=AssetClassInterestSerializer, path_prefix=PATH_PREFIX, ) registry.register( metadata_id='required-checks-conducted', model=models.RequiredChecksConducted, path_prefix=PATH_PREFIX, ) registry.register( metadata_id='construction-risk', model=models.ConstructionRisk, path_prefix=PATH_PREFIX, ) registry.register( metadata_id='deal-ticket-size', model=models.DealTicketSize, path_prefix=PATH_PREFIX, )
from datahub.metadata.fixtures import Fixture from datahub.metadata.registry import registry from datahub.omis.market import models from datahub.omis.market.serializers import MarketSerializer class MarketFixtures(Fixture): """Metadata fixtures (for the loadinitialmetadata command).""" files = [ 'fixtures/markets.yaml', ] registry.register( metadata_id='omis-market', model=models.Market, queryset=models.Market.objects.select_related('country').order_by( 'country__name'), serializer=MarketSerializer, )
from datahub.event import models from datahub.metadata.registry import registry registry.register( metadata_id='programme', model=models.Programme, ) registry.register( metadata_id='event-type', model=models.EventType, ) registry.register( metadata_id='location-type', model=models.LocationType, )
from datahub.interaction import models from datahub.metadata.registry import registry registry.register( metadata_id='communication-channel', model=models.CommunicationChannel, ) registry.register( metadata_id='service-delivery-status', model=models.ServiceDeliveryStatus, ) registry.register( metadata_id='policy-area', model=models.PolicyArea, ) registry.register( metadata_id='policy-issue-type', model=models.PolicyIssueType, )
from datahub.investment.project.evidence.models import EvidenceTag from datahub.metadata.registry import registry registry.register( metadata_id='evidence-tag', model=EvidenceTag, )
from datahub.metadata import models from datahub.metadata.filters import ServiceFilterSet from datahub.metadata.registry import registry from datahub.metadata.serializers import SectorSerializer, ServiceSerializer, TeamSerializer registry.register(metadata_id='business-type', model=models.BusinessType) registry.register(metadata_id='country', model=models.Country) registry.register(metadata_id='employee-range', model=models.EmployeeRange) registry.register(metadata_id='overseas-region', model=models.OverseasRegion) registry.register( filterset_fields={ 'level': ['lte'], }, metadata_id='sector', model=models.Sector, queryset=models.Sector.objects.select_related( 'parent', 'parent__parent', ), serializer=SectorSerializer, ) registry.register( filterset_class=ServiceFilterSet, metadata_id='service', model=models.Service, serializer=ServiceSerializer, ) registry.register(metadata_id='team-role', model=models.TeamRole) registry.register( metadata_id='team', model=models.Team,
from datahub.metadata.fixtures import Fixture from datahub.metadata.registry import registry class InvestmentFixtures(Fixture): """Metadata fixtures (for the loadinitialmetadata command).""" files = [ 'fixtures/investor_types.yaml', 'fixtures/involvements.yaml', 'fixtures/specific_programmes.yaml', ] registry.register( metadata_id='investment-specific-programme', model=models.SpecificProgramme, ) registry.register( metadata_id='investment-investor-type', model=models.InvestorType, ) registry.register( metadata_id='investment-involvement', model=models.Involvement, ) registry.register( metadata_id='investment-delivery-partner', model=models.InvestmentDeliveryPartner,
from datahub.metadata import models from datahub.metadata.filters import ServiceFilterSet, TeamFilterSet from datahub.metadata.registry import registry from datahub.metadata.serializers import ( AdministrativeAreaSerializer, CountrySerializer, ExchangeRateSerializer, InvestmentProjectStageSerializer, SectorSerializer, ServiceSerializer, TeamSerializer, ) registry.register( metadata_id='trade-agreement', model=models.TradeAgreement, ) registry.register( metadata_id='exchange-rate', model=models.ExchangeRate, serializer=ExchangeRateSerializer, ) registry.register( filterset_fields=['country'], metadata_id='administrative-area', model=models.AdministrativeArea, queryset=models.AdministrativeArea.objects.select_related('country', ), serializer=AdministrativeAreaSerializer, )
from datahub.company.models import ExportExperienceCategory, OneListTier from datahub.metadata.fixtures import Fixture from datahub.metadata.registry import registry class InteractionFixtures(Fixture): """Metadata fixtures (for the loadinitialmetadata command).""" files = [ 'fixtures/export_experience_categories.yaml', ] registry.register( metadata_id='export-experience-category', model=ExportExperienceCategory, ) registry.register( metadata_id='one-list-tier', model=OneListTier, )
from datahub.investment.opportunity import models from datahub.metadata.registry import registry PATH_PREFIX = 'large-capital-opportunity' registry.register( metadata_id='opportunity-status', model=models.OpportunityStatus, path_prefix=PATH_PREFIX, ) registry.register( metadata_id='opportunity-type', model=models.OpportunityType, path_prefix=PATH_PREFIX, ) registry.register( metadata_id='opportunity-value-type', model=models.OpportunityValueType, path_prefix=PATH_PREFIX, ) registry.register( metadata_id='abandonment-reason', model=models.AbandonmentReason, path_prefix=PATH_PREFIX, )