-
Notifications
You must be signed in to change notification settings - Fork 31
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 #2047 from WikiWatershed/tt/bigcz-refactor-backend…
…-support-catalog-fields BiG-CZ Refactor Back-end Connects #2036
- Loading branch information
Showing
11 changed files
with
117 additions
and
31 deletions.
There are no files selected for viewing
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
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,13 @@ | ||
# -*- coding: utf-8 -*- | ||
from __future__ import print_function | ||
from __future__ import unicode_literals | ||
from __future__ import division | ||
|
||
from apps.bigcz.models import Resource | ||
from apps.bigcz.serializers import ResourceSerializer | ||
|
||
# Import catalog name and search function, so it can be exported from here | ||
from apps.bigcz.clients.cinergi.search import CATALOG_NAME, search # NOQA | ||
|
||
model = Resource | ||
serializer = ResourceSerializer |
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
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,13 @@ | ||
# -*- coding: utf-8 -*- | ||
from __future__ import print_function | ||
from __future__ import unicode_literals | ||
from __future__ import division | ||
|
||
from apps.bigcz.clients.cuahsi.models import CuahsiResource | ||
from apps.bigcz.clients.cuahsi.serializers import CuahsiResourceSerializer | ||
|
||
# Import catalog name and search function, so it can be exported from here | ||
from apps.bigcz.clients.cuahsi.search import CATALOG_NAME, search # NOQA | ||
|
||
model = CuahsiResource | ||
serializer = CuahsiResourceSerializer |
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,16 @@ | ||
# -*- coding: utf-8 -*- | ||
from __future__ import print_function | ||
from __future__ import unicode_literals | ||
from __future__ import division | ||
|
||
from apps.bigcz.models import Resource | ||
|
||
|
||
class CuahsiResource(Resource): | ||
def __init__(self, id, description, author, links, title, | ||
created_at, updated_at, geom, test_field): | ||
super(CuahsiResource, self).__init__(id, description, author, links, | ||
title, created_at, updated_at, | ||
geom) | ||
|
||
self.test_field = test_field |
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
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,12 @@ | ||
# -*- coding: utf-8 -*- | ||
from __future__ import print_function | ||
from __future__ import unicode_literals | ||
from __future__ import division | ||
|
||
from rest_framework.serializers import CharField | ||
|
||
from apps.bigcz.serializers import ResourceSerializer | ||
|
||
|
||
class CuahsiResourceSerializer(ResourceSerializer): | ||
test_field = CharField() |
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,13 @@ | ||
# -*- coding: utf-8 -*- | ||
from __future__ import print_function | ||
from __future__ import unicode_literals | ||
from __future__ import division | ||
|
||
from apps.bigcz.models import Resource | ||
from apps.bigcz.serializers import ResourceSerializer | ||
|
||
# Import catalog name and search function, so it can be exported from here | ||
from apps.bigcz.clients.hydroshare.search import CATALOG_NAME, search # NOQA | ||
|
||
model = Resource | ||
serializer = ResourceSerializer |
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
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
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