Skip to content

Commit

Permalink
Merge pull request #641 from akvo/feature/632_rest_framework
Browse files Browse the repository at this point in the history
[#632] rest framework
  • Loading branch information
KasperBrandt committed Jun 19, 2014
2 parents 0c6702f + e01bae3 commit 9226074
Show file tree
Hide file tree
Showing 53 changed files with 1,019 additions and 98 deletions.
42 changes: 0 additions & 42 deletions akvo/rest/serializers.py

This file was deleted.

55 changes: 55 additions & 0 deletions akvo/rest/serializers/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# -*- 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 .benchmark import BenchmarkSerializer
from .benchmark_name import BenchmarknameSerializer
from .budget_item import BudgetItemSerializer
from .budget_item_label import BudgetItemLabelSerializer
from .category import CategorySerializer
from .country import CountrySerializer
from .focus_area import FocusAreaSerializer
from .goal import GoalSerializer
from .internal_organisation_id import InternalOrganisationIDSerializer
from .invoice import InvoiceSerializer
from .link import LinkSerializer
from .organisation import OrganisationSerializer
from .organisation_location import OrganisationLocationSerializer
from .partner_site import PartnerSiteSerializer
from .partner_type import PartnerTypeSerializer
from .partnership import PartnershipSerializer
from .project import ProjectSerializer
from .project_comment import ProjectCommentSerializer
from .project_location import ProjectLocationSerializer
from .project_update import ProjectUpdateSerializer
from .publishing_status import PublishingStatusSerializer
from .user import UserSerializer
from .user_profile import UserProfileSerializer

__all__ = [
'BenchmarkSerializer',
'BenchmarknameSerializer',
'BudgetItemSerializer',
'BudgetItemLabelSerializer',
'CategorySerializer,'
'CountrySerializer',
'FocusAreaSerializer',
'GoalSerializer',
'InternalOrganisationIDSerializer',
'InvoiceSerializer',
'LinkSerializer',
'OrganisationSerializer',
'OrganisationLocationSerializer',
'PartnerSiteSerializer',
'PartnerTypeSerializer',
'PartnershipSerializer',
'ProjectSerializer',
'ProjectCommentSerializer',
'ProjectLocationSerializer',
'ProjectUpdateSerializer',
'PublishingStatusSerializer',
'UserSerializer,'
'UserProfileSerializer',
]
18 changes: 18 additions & 0 deletions akvo/rest/serializers/benchmark.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 akvo.rsr.models import Benchmark

from .rsr_serializer import BaseRSRSerializer


class BenchmarkSerializer(BaseRSRSerializer):

class Meta:
model = Benchmark
fields = (
)
18 changes: 18 additions & 0 deletions akvo/rest/serializers/benchmark_name.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 akvo.rsr.models import Benchmarkname

from .rsr_serializer import BaseRSRSerializer


class BenchmarknameSerializer(BaseRSRSerializer):

class Meta:
model = Benchmarkname
fields = (
)
18 changes: 18 additions & 0 deletions akvo/rest/serializers/budget_item.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 akvo.rsr.models import BudgetItem

from .rsr_serializer import BaseRSRSerializer


class BudgetItemSerializer(BaseRSRSerializer):

class Meta:
model = BudgetItem
fields = (
)
18 changes: 18 additions & 0 deletions akvo/rest/serializers/budget_item_label.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 akvo.rsr.models import BudgetItemLabel

from .rsr_serializer import BaseRSRSerializer


class BudgetItemLabelSerializer(BaseRSRSerializer):

class Meta:
model = BudgetItemLabel
fields = (
)
18 changes: 18 additions & 0 deletions akvo/rest/serializers/category.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 akvo.rsr.models import Category

from .rsr_serializer import BaseRSRSerializer


class CategorySerializer(BaseRSRSerializer):

class Meta:
model = Category
fields = (
)
18 changes: 18 additions & 0 deletions akvo/rest/serializers/country.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 akvo.rsr.models import Country

from .rsr_serializer import BaseRSRSerializer


class CountrySerializer(BaseRSRSerializer):

class Meta:
model = Country
fields = (
)
18 changes: 18 additions & 0 deletions akvo/rest/serializers/focus_area.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 akvo.rsr.models import FocusArea

from .rsr_serializer import BaseRSRSerializer


class FocusAreaSerializer(BaseRSRSerializer):

class Meta:
model = FocusArea
fields = (
)
18 changes: 18 additions & 0 deletions akvo/rest/serializers/goal.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 akvo.rsr.models import Goal

from .rsr_serializer import BaseRSRSerializer


class GoalSerializer(BaseRSRSerializer):

class Meta:
model = Goal
fields = (
)
18 changes: 18 additions & 0 deletions akvo/rest/serializers/internal_organisation_id.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 akvo.rsr.models import InternalOrganisationID

from .rsr_serializer import BaseRSRSerializer


class InternalOrganisationIDSerializer(BaseRSRSerializer):

class Meta:
model = InternalOrganisationID
fields = (
)
18 changes: 18 additions & 0 deletions akvo/rest/serializers/invoice.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 akvo.rsr.models import Invoice

from .rsr_serializer import BaseRSRSerializer


class InvoiceSerializer(BaseRSRSerializer):

class Meta:
model = Invoice
fields = (
)
18 changes: 18 additions & 0 deletions akvo/rest/serializers/link.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 akvo.rsr.models import Link

from .rsr_serializer import BaseRSRSerializer


class LinkSerializer(BaseRSRSerializer):

class Meta:
model = Link
fields = (
)
18 changes: 18 additions & 0 deletions akvo/rest/serializers/organisation.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 akvo.rsr.models import Organisation

from .rsr_serializer import BaseRSRSerializer


class OrganisationSerializer(BaseRSRSerializer):

class Meta:
model = Organisation
fields = (
)
19 changes: 19 additions & 0 deletions akvo/rest/serializers/organisation_location.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# -*- 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 akvo.rsr.models import OrganisationLocation

from .rsr_serializer import BaseRSRSerializer


class OrganisationLocationSerializer(BaseRSRSerializer):

class Meta:
model = OrganisationLocation
fields = (
)

18 changes: 18 additions & 0 deletions akvo/rest/serializers/partner_site.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 akvo.rsr.models import PartnerSite

from .rsr_serializer import BaseRSRSerializer


class PartnerSiteSerializer(BaseRSRSerializer):

class Meta:
model = PartnerSite
fields = (
)
18 changes: 18 additions & 0 deletions akvo/rest/serializers/partner_type.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 akvo.rsr.models import PartnerType

from .rsr_serializer import BaseRSRSerializer


class PartnerTypeSerializer(BaseRSRSerializer):

class Meta:
model = PartnerType
fields = (
)
Loading

0 comments on commit 9226074

Please sign in to comment.