File tree Expand file tree Collapse file tree 1 file changed +10
-6
lines changed
Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Original file line number Diff line number Diff line change 11"""app.data"""
2- from ..services .location .csbs import CSBSLocationService
3- from ..services .location .jhu import JhuLocationService
4- from ..services .location .nyt import NYTLocationService
2+ #from ..services.location.csbs import CSBSLocationService
3+ #from ..services.location.jhu import JhuLocationService
4+ #from ..services.location.nyt import NYTLocationService
5+ from ..services .location .locationFactory import LocationServiceFactory
56
67# Mapping of services to data-sources.
78"""
@@ -19,11 +20,14 @@ def data_source(source):
1920 :returns: The service.
2021 :rtype: LocationService
2122 """
23+
24+ location = LocationServiceFactory ()
25+
2226 if source .lower () = "csbs" :
23- return CSBSLocationService ()
27+ return location . createCSBS ()
2428 elif source .lower () = "nyt" :
25- return NYTLocationService ()
29+ return location . createNYT ()
2630 else :
27- return JhuLocationService ()
31+ return location . getDefault ()
2832
2933 #return DATA_SOURCES.get(source.lower())
You can’t perform that action at this time.
0 commit comments