Skip to content
This repository has been archived by the owner on May 23, 2023. It is now read-only.

Commit

Permalink
Added unit of measure to api and manual_mapping api call.
Browse files Browse the repository at this point in the history
  • Loading branch information
kjod committed Apr 7, 2017
1 parent 23e9aa2 commit b535e34
Show file tree
Hide file tree
Showing 13 changed files with 820 additions and 33 deletions.
1 change: 1 addition & 0 deletions ZOOM/api/indicator/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,5 +83,6 @@ class Meta:
'date_value',
'source_id',
"measure_value",
"unit_of_measure",
'other',
)
8 changes: 6 additions & 2 deletions ZOOM/api/indicator/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ class IndicatorDataList(ListAPIView):
'date_value',
'source_id',
'measure_value',
'unit_of_measure'
'other',
)

Expand Down Expand Up @@ -125,6 +126,9 @@ class IndicatorDataAggregations(AggregationView):
),
GroupBy(
query_param="country_id__region__name",
fields="country_id__region__name",
),
fields="country_id__region__name"),
GroupBy(
query_param="unit_of_measure",
fields="unit_of_measure",
),
)
Empty file added ZOOM/api/manual_map/__init__.py
Empty file.
3 changes: 3 additions & 0 deletions ZOOM/api/manual_map/admin.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from django.contrib import admin

# Register your models here.
7 changes: 7 additions & 0 deletions ZOOM/api/manual_map/apps.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
from __future__ import unicode_literals

from django.apps import AppConfig


class ManualMappingConfig(AppConfig):
name = 'manual_mapping'
5 changes: 5 additions & 0 deletions ZOOM/api/manual_map/models.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
from __future__ import unicode_literals

from django.db import models

# Create your models here.
Loading

0 comments on commit b535e34

Please sign in to comment.