Exemplo n.º 1
0
    def _get_source(self):
        try:
            source = Source.objects.get(module_name="molly.providers.apps.maps.bbc_tpeg")
        except Source.DoesNotExist:
            source = Source(module_name="molly.providers.apps.maps.bbc_tpeg")

        source.name = "BBC TPEG"
        source.save()

        return source
Exemplo n.º 2
0
 def _get_source(self):
     try:
         source = Source.objects.get(module_name="mobile.providers.apps.maps.osm")
     except Source.DoesNotExist:
         source = Source(module_name="mobile.providers.apps.maps.osm")
     
     source.name = "OpenStreetMap"
     source.save()
     
     return source
Exemplo n.º 3
0
    def _get_source(self):
        try:
            source = Source.objects.get(module_name="molly.providers.apps.maps.postcodes")
        except Source.DoesNotExist:
            source = Source(module_name="molly.providers.apps.maps.postcodes")

        source.name = "Postcodes"
        source.save()

        return source
Exemplo n.º 4
0
    def _get_source(self):
        try:
            source = Source.objects.get(module_name="molly.providers.apps.maps.naptan")
        except Source.DoesNotExist:
            source = Source(module_name="molly.providers.apps.maps.naptan")

        source.name = "National Public Transport Access Nodes (NaPTAN) database"
        source.save()

        return source