Example #1
0
 def _get_source(self):
     try:
         source = Source.objects.get(module_name="molly.providers.apps.maps.osm")
     except Source.DoesNotExist:
         source = Source(module_name="molly.providers.apps.maps.osm")
     
     source.name = "OpenStreetMap"
     source.save()
     
     return source
Example #2
0
    def _get_source(self):
        try:
            source = Source.objects.get(module_name="molly.providers.apps.maps.oxpoints")
        except Source.DoesNotExist:
            source = Source(module_name="molly.providers.apps.maps.oxpoints")

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

        return source
Example #3
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
Example #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
Example #5
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
Example #6
0
    def _get_source(self):
        try:
            source = Source.objects.get(module_name=self.MODULE_NAME)
        except Source.DoesNotExist:
            source = Source(module_name=self.MODULE_NAME)

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

        return source
Example #7
0
 def _get_source(self):
     try:
         source = Source.objects.get(module_name="molly.providers.apps.maps.osm")
     except Source.DoesNotExist:
         source = Source(module_name="molly.providers.apps.maps.osm")
     
     source.name = "OpenStreetMap"
     source.save()
     
     return source
Example #8
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
Example #9
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