-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for activity_dossiers and accommodation_dossiers.
- Loading branch information
1 parent
b60f36a
commit 110db6d
Showing
6 changed files
with
72 additions
and
5 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 |
---|---|---|
@@ -1,2 +1,4 @@ | ||
# flake8: NOQA | ||
from .place_dossier import PlaceDossier | ||
from .activity_dossier import ActivityDossier | ||
from .accommodation_dossier import AccommodationDossier |
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,30 @@ | ||
from __future__ import unicode_literals | ||
|
||
from ..base import Resource | ||
from ...models.base import BaseModel | ||
|
||
|
||
class AccommodationDossier(Resource): | ||
_resource_name = 'accommodation_dossiers' | ||
|
||
_as_is_fields = [ | ||
'id', 'href', 'name', | ||
'website', | ||
'property_type', | ||
# punt: | ||
'address', | ||
'details', | ||
'features', | ||
'emails', | ||
'phone_numbers', | ||
'rooms', | ||
] | ||
|
||
_date_time_fields_local = ['date_created', 'date_last_modified'] | ||
|
||
@property | ||
def _model_fields(self): | ||
from ..geo import Place | ||
return [ | ||
('location', Place), | ||
] |
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,30 @@ | ||
from __future__ import unicode_literals | ||
|
||
from ..base import Resource | ||
from ...models.base import BaseModel | ||
|
||
|
||
class ActivityDossier(Resource): | ||
_resource_name = 'activity_dossiers' | ||
|
||
_as_is_fields = [ | ||
'id', 'href', | ||
'name', | ||
'duration_min', 'duration_max', | ||
'price_per_person_min', 'price_per_person_max', | ||
'price_per_group_min', 'price_per_group_max', | ||
'currency', | ||
# XXX do we need something else for these two? | ||
'segment', | ||
'details', | ||
] | ||
|
||
_date_time_fields_local = ['date_created', 'date_last_modified'] | ||
|
||
@property | ||
def _model_fields(self): | ||
from ..geo import Place | ||
return [ | ||
('start_location', Place), | ||
('end_location', Place), | ||
] |
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