-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1097 from akvo/1047_codelists_app
[#1047] Codelists app
- Loading branch information
Showing
92 changed files
with
8,179 additions
and
715 deletions.
There are no files selected for viewing
File renamed without changes.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,127 @@ | ||
# -*- coding: utf-8 -*- | ||
|
||
# Akvo RSR is covered by the GNU Affero General Public License. | ||
# See more details in the license.txt file located at the root folder of the Akvo RSR module. | ||
# For additional details on the GNU license please see < http://www.gnu.org/licenses/agpl.html >. | ||
|
||
from .activity_date_type import ActivityDateType | ||
from .activity_scope import ActivityScope | ||
from .activity_status import ActivityStatus | ||
from .aid_type import AidType | ||
from .aid_type_category import AidTypeCategory | ||
from .aid_type_flag import AidTypeFlag | ||
from .budget_identifier import BudgetIdentifier | ||
from .budget_identifier_sector import BudgetIdentifierSector | ||
from .budget_identifier_sector_category import BudgetIdentifierSectorCategory | ||
from .budget_identifier_vocabulary import BudgetIdentifierVocabulary | ||
from .budget_type import BudgetType | ||
from .collaboration_type import CollaborationType | ||
from .condition_type import ConditionType | ||
from .contact_type import ContactType | ||
from .country import Country | ||
from .crs_add_other_flags import CRSAddOtherFlags | ||
from .currency import Currency | ||
from .description_type import DescriptionType | ||
from .disbursement_channel import DisbursementChannel | ||
from .document_category import DocumentCategory | ||
from .document_category_category import DocumentCategoryCategory | ||
from .file_format import FileFormat | ||
from .finance_type import FinanceType | ||
from .finance_type_category import FinanceTypeCategory | ||
from .flow_type import FlowType | ||
from .gazetteer_agency import GazetteerAgency | ||
from .geographic_exactness import GeographicExactness | ||
from .geographic_location_class import GeographicLocationClass | ||
from .geographic_location_reach import GeographicLocationReach | ||
from .geographic_vocabulary import GeographicVocabulary | ||
from .geographical_precision import GeographicalPrecision | ||
from .indicator_measure import IndicatorMeasure | ||
from .language import Language | ||
from .loan_repayment_period import LoanRepaymentPeriod | ||
from .loan_repayment_type import LoanRepaymentType | ||
from .location_type import LocationType | ||
from .location_type_category import LocationTypeCategory | ||
from .organisation_identifier import OrganisationIdentifier | ||
from .organisation_registration_agency import OrganisationRegistrationAgency | ||
from .organisation_role import OrganisationRole | ||
from .organisation_type import OrganisationType | ||
from .other_identifier_type import OtherIdentifierType | ||
from .policy_marker import PolicyMarker | ||
from .policy_marker_vocabulary import PolicyMarkerVocabulary | ||
from .policy_significance import PolicySignificance | ||
from .publisher_type import PublisherType | ||
from .region import Region | ||
from .region_vocabulary import RegionVocabulary | ||
from .related_activity_type import RelatedActivityType | ||
from .result_type import ResultType | ||
from .sector import Sector | ||
from .sector_category import SectorCategory | ||
from .sector_vocabulary import SectorVocabulary | ||
from .tied_status import TiedStatus | ||
from .transaction_type import TransactionType | ||
from .value_type import ValueType | ||
from .verification_status import VerificationStatus | ||
from .version import Version | ||
from .vocabulary import Vocabulary | ||
|
||
__all__ = [ | ||
'ActivityDateType', | ||
'ActivityScope', | ||
'ActivityStatus', | ||
'AidType', | ||
'AidTypeCategory', | ||
'AidTypeFlag', | ||
'BudgetIdentifier', | ||
'BudgetIdentifierSector', | ||
'BudgetIdentifierSectorCategory', | ||
'BudgetIdentifierVocabulary', | ||
'BudgetType', | ||
'CollaborationType', | ||
'ConditionType', | ||
'ContactType', | ||
'Country', | ||
'CRSAddOtherFlags', | ||
'Currency', | ||
'DescriptionType', | ||
'DisbursementChannel', | ||
'DocumentCategory', | ||
'DocumentCategoryCategory', | ||
'FileFormat', | ||
'FinanceType', | ||
'FinanceTypeCategory', | ||
'FlowType', | ||
'GazetteerAgency', | ||
'GeographicExactness', | ||
'GeographicLocationClass', | ||
'GeographicLocationReach', | ||
'GeographicVocabulary', | ||
'GeographicalPrecision', | ||
'IndicatorMeasure', | ||
'Language', | ||
'LoanRepaymentPeriod', | ||
'LoanRepaymentType', | ||
'LocationType', | ||
'LocationTypeCategory', | ||
'OrganisationIdentifier', | ||
'OrganisationRegistrationAgency', | ||
'OrganisationRole', | ||
'OrganisationType', | ||
'OtherIdentifierType', | ||
'PolicyMarker', | ||
'PolicyMarkerVocabulary' | ||
'PolicySignificance', | ||
'PublisherType', | ||
'Region', | ||
'RegionVocabulary', | ||
'RelatedActivityType', | ||
'ResultType', | ||
'Sector', | ||
'SectorCategory', | ||
'SectorVocabulary', | ||
'TiedStatus', | ||
'TransactionType', | ||
'ValueType', | ||
'VerificationStatus', | ||
'Version', | ||
'Vocabulary', | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# -*- coding: utf-8 -*- | ||
|
||
# Akvo RSR is covered by the GNU Affero General Public License. | ||
# See more details in the license.txt file located at the root folder of the Akvo RSR module. | ||
# For additional details on the GNU license please see < http://www.gnu.org/licenses/agpl.html >. | ||
|
||
|
||
from django.db import models | ||
from django.utils.translation import ugettext_lazy as _ | ||
|
||
from .base_codelist import BaseCodelist | ||
|
||
|
||
class ActivityDateType(BaseCodelist): | ||
name = models.CharField(_(u'name'), max_length=300, blank=True, null=False) | ||
description = models.TextField(_(u'description'), blank=True, null=False) | ||
|
||
def __unicode__(self): | ||
return self.code + ' - ' + self.name | ||
|
||
class Meta: | ||
app_label = 'codelists' | ||
ordering = ('-version', 'code') | ||
verbose_name = _(u'activity date type') | ||
verbose_name_plural = _(u'activity date types') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# -*- coding: utf-8 -*- | ||
|
||
# Akvo RSR is covered by the GNU Affero General Public License. | ||
# See more details in the license.txt file located at the root folder of the Akvo RSR module. | ||
# For additional details on the GNU license please see < http://www.gnu.org/licenses/agpl.html >. | ||
|
||
|
||
from django.db import models | ||
from django.utils.translation import ugettext_lazy as _ | ||
|
||
from .base_codelist import BaseCodelist | ||
|
||
|
||
class ActivityScope(BaseCodelist): | ||
name = models.CharField(_(u'name'), max_length=300, blank=True, null=False) | ||
description = models.TextField(_(u'description'), blank=True, null=False) | ||
|
||
def __unicode__(self): | ||
return self.code + ' - ' + self.name | ||
|
||
class Meta: | ||
app_label = 'codelists' | ||
ordering = ('-version', 'code') | ||
verbose_name = _(u'activity scope') | ||
verbose_name_plural = _(u'activity scopes') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# -*- coding: utf-8 -*- | ||
|
||
# Akvo RSR is covered by the GNU Affero General Public License. | ||
# See more details in the license.txt file located at the root folder of the Akvo RSR module. | ||
# For additional details on the GNU license please see < http://www.gnu.org/licenses/agpl.html >. | ||
|
||
|
||
from django.db import models | ||
from django.utils.translation import ugettext_lazy as _ | ||
|
||
from .base_codelist import BaseCodelist | ||
|
||
|
||
class ActivityStatus(BaseCodelist): | ||
name = models.CharField(_(u'name'), max_length=300, blank=True, null=False) | ||
description = models.TextField(_(u'description'), blank=True, null=False) | ||
language = models.CharField(_(u'language'), max_length=2, blank=True, null=False) | ||
|
||
def __unicode__(self): | ||
return self.code + ' - ' + self.name | ||
|
||
class Meta: | ||
app_label = 'codelists' | ||
ordering = ('-version', 'code') | ||
verbose_name = _(u'activity status') | ||
verbose_name_plural = _(u'activity statuses') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# -*- coding: utf-8 -*- | ||
|
||
# Akvo RSR is covered by the GNU Affero General Public License. | ||
# See more details in the license.txt file located at the root folder of the Akvo RSR module. | ||
# For additional details on the GNU license please see < http://www.gnu.org/licenses/agpl.html >. | ||
|
||
|
||
from django.db import models | ||
from django.utils.translation import ugettext_lazy as _ | ||
|
||
from .base_codelist import BaseCodelist | ||
|
||
|
||
class AidType(BaseCodelist): | ||
category = models.CharField(_(u'category'), max_length=2, blank=True, null=False) | ||
name = models.CharField(_(u'name'), max_length=300, blank=True, null=False) | ||
description = models.TextField(_(u'description'), blank=True, null=False) | ||
language = models.CharField(_(u'language'), max_length=2, blank=True, null=False) | ||
category_name = models.CharField(_(u'category name'), max_length=300, blank=True, null=False) | ||
category_description = models.TextField(_(u'category description'), blank=True, null=False) | ||
|
||
def __unicode__(self): | ||
return self.code + ' - ' + self.name | ||
|
||
class Meta: | ||
app_label = 'codelists' | ||
ordering = ('-version', 'code') | ||
verbose_name = _(u'aid type') | ||
verbose_name_plural = _(u'aid types') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# -*- coding: utf-8 -*- | ||
|
||
# Akvo RSR is covered by the GNU Affero General Public License. | ||
# See more details in the license.txt file located at the root folder of the Akvo RSR module. | ||
# For additional details on the GNU license please see < http://www.gnu.org/licenses/agpl.html >. | ||
|
||
|
||
from django.db import models | ||
from django.utils.translation import ugettext_lazy as _ | ||
|
||
from .base_codelist import BaseCodelist | ||
|
||
|
||
class AidTypeCategory(BaseCodelist): | ||
name = models.CharField(_(u'name'), max_length=300, blank=True, null=False) | ||
description = models.TextField(_(u'description'), blank=True, null=False) | ||
|
||
def __unicode__(self): | ||
return self.code + ' - ' + self.name | ||
|
||
class Meta: | ||
app_label = 'codelists' | ||
ordering = ('-version', 'code') | ||
verbose_name = _(u'aid type category') | ||
verbose_name_plural = _(u'aid type categories') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# -*- coding: utf-8 -*- | ||
|
||
# Akvo RSR is covered by the GNU Affero General Public License. | ||
# See more details in the license.txt file located at the root folder of the Akvo RSR module. | ||
# For additional details on the GNU license please see < http://www.gnu.org/licenses/agpl.html >. | ||
|
||
|
||
from django.db import models | ||
from django.utils.translation import ugettext_lazy as _ | ||
|
||
from .base_codelist import BaseCodelist | ||
|
||
|
||
class AidTypeFlag(BaseCodelist): | ||
name = models.CharField(_(u'name'), max_length=300, blank=True, null=False) | ||
|
||
def __unicode__(self): | ||
return self.code + ' - ' + self.name | ||
|
||
class Meta: | ||
app_label = 'codelists' | ||
ordering = ('-version', 'code') | ||
verbose_name = _(u'aid type flag') | ||
verbose_name_plural = _(u'aid type flags') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# -*- coding: utf-8 -*- | ||
|
||
# Akvo RSR is covered by the GNU Affero General Public License. | ||
# See more details in the license.txt file located at the root folder of the Akvo RSR module. | ||
# For additional details on the GNU license please see < http://www.gnu.org/licenses/agpl.html >. | ||
|
||
|
||
from django.db import models | ||
from django.utils.translation import ugettext_lazy as _ | ||
|
||
|
||
class BaseCodelist(models.Model): | ||
code = models.CharField(_(u'code'), max_length=100, blank=True, null=False) | ||
version = models.ForeignKey('Version', verbose_name=_(u'version'), blank=False, null=False) | ||
|
||
class Meta: | ||
app_label = 'codelists' | ||
abstract = True |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# -*- coding: utf-8 -*- | ||
|
||
# Akvo RSR is covered by the GNU Affero General Public License. | ||
# See more details in the license.txt file located at the root folder of the Akvo RSR module. | ||
# For additional details on the GNU license please see < http://www.gnu.org/licenses/agpl.html >. | ||
|
||
|
||
from django.db import models | ||
from django.utils.translation import ugettext_lazy as _ | ||
|
||
from .base_codelist import BaseCodelist | ||
|
||
|
||
class BudgetIdentifier(BaseCodelist): | ||
category = models.CharField(_(u'category'), max_length=100, blank=True, null=False) | ||
name = models.CharField(_(u'name'), max_length=300, blank=True, null=False) | ||
sector = models.CharField(_(u'sector'), max_length=100, blank=True, null=False) | ||
|
||
def __unicode__(self): | ||
return self.code + ' - ' + self.name | ||
|
||
class Meta: | ||
app_label = 'codelists' | ||
ordering = ('-version', 'code') | ||
verbose_name = _(u'budget identifier') | ||
verbose_name_plural = _(u'budget identifiers') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# -*- coding: utf-8 -*- | ||
|
||
# Akvo RSR is covered by the GNU Affero General Public License. | ||
# See more details in the license.txt file located at the root folder of the Akvo RSR module. | ||
# For additional details on the GNU license please see < http://www.gnu.org/licenses/agpl.html >. | ||
|
||
|
||
from django.db import models | ||
from django.utils.translation import ugettext_lazy as _ | ||
|
||
from .base_codelist import BaseCodelist | ||
|
||
|
||
class BudgetIdentifierSector(BaseCodelist): | ||
category = models.CharField(_(u'category'), max_length=2, blank=True, null=False) | ||
name = models.CharField(_(u'name'), max_length=300, blank=True, null=False) | ||
|
||
def __unicode__(self): | ||
return self.code + ' - ' + self.name | ||
|
||
class Meta: | ||
app_label = 'codelists' | ||
ordering = ('-version', 'code') | ||
verbose_name = _(u'budget identifier sector') | ||
verbose_name_plural = _(u'budget identifier sectors') |
24 changes: 24 additions & 0 deletions
24
akvo/codelists/models/budget_identifier_sector_category.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# -*- coding: utf-8 -*- | ||
|
||
# Akvo RSR is covered by the GNU Affero General Public License. | ||
# See more details in the license.txt file located at the root folder of the Akvo RSR module. | ||
# For additional details on the GNU license please see < http://www.gnu.org/licenses/agpl.html >. | ||
|
||
|
||
from django.db import models | ||
from django.utils.translation import ugettext_lazy as _ | ||
|
||
from .base_codelist import BaseCodelist | ||
|
||
|
||
class BudgetIdentifierSectorCategory(BaseCodelist): | ||
name = models.CharField(_(u'name'), max_length=300, blank=True, null=False) | ||
|
||
def __unicode__(self): | ||
return self.code + ' - ' + self.name | ||
|
||
class Meta: | ||
app_label = 'codelists' | ||
ordering = ('-version', 'code') | ||
verbose_name = _(u'budget identifier sector category') | ||
verbose_name_plural = _(u'budget identifier sector categories') |
Oops, something went wrong.