Skip to content

Commit

Permalink
[#1049] Merged 'develop' into branch
Browse files Browse the repository at this point in the history
  • Loading branch information
KasperBrandt committed Feb 17, 2015
2 parents 75d31db + 50d1046 commit b81d801
Show file tree
Hide file tree
Showing 170 changed files with 10,868 additions and 1,088 deletions.
File renamed without changes.
1,274 changes: 1,274 additions & 0 deletions akvo/codelists/migrations/0001_initial.py

Large diffs are not rendered by default.

525 changes: 525 additions & 0 deletions akvo/codelists/migrations/0002_initial_data.py

Large diffs are not rendered by default.

Empty file.
127 changes: 127 additions & 0 deletions akvo/codelists/models/__init__.py
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',
]
25 changes: 25 additions & 0 deletions akvo/codelists/models/activity_date_type.py
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')
25 changes: 25 additions & 0 deletions akvo/codelists/models/activity_scope.py
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')
26 changes: 26 additions & 0 deletions akvo/codelists/models/activity_status.py
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')
29 changes: 29 additions & 0 deletions akvo/codelists/models/aid_type.py
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')
25 changes: 25 additions & 0 deletions akvo/codelists/models/aid_type_category.py
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')
24 changes: 24 additions & 0 deletions akvo/codelists/models/aid_type_flag.py
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')
18 changes: 18 additions & 0 deletions akvo/codelists/models/base_codelist.py
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
26 changes: 26 additions & 0 deletions akvo/codelists/models/budget_identifier.py
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')
25 changes: 25 additions & 0 deletions akvo/codelists/models/budget_identifier_sector.py
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 akvo/codelists/models/budget_identifier_sector_category.py
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')
Loading

0 comments on commit b81d801

Please sign in to comment.