[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Maposmatic-dev] [PATCH 2/3] Allow the use of MapOSMatic without a G
Re: [Maposmatic-dev] [PATCH 2/3] Allow the use of MapOSMatic without a GIS-capable database.
Wed, 9 Sep 2009 14:11:12 +0200
* David MENTRE <address@hidden> [2009-09-09 14:08:18]:
> 2009/9/9 Maxime Petazzoni <address@hidden>:
> > + # If no GIS database is available, always return True to allow
> > + # normal form processing as if the city existed.
> > + if not www.settings.has_gis_database():
> > + return True
> I'm not sure the logic behind this patch is correct. GIS_DATABASE_NAME
> is used to tell if the Django and OSM databases are the same or not.
> In both cases, it is still possible to make a PostGIS request to the
> OSM database (either under the name DATABASE_NAME or
> GIS_DATABASE_NAME) to check that the city is available.
I don't agree. In all cases GIS_DATABASE_NAME is used for the PostGIS
requests made by MapOSMatic. So if it's not defined (as
has_gis_database() would tell you by returning False), it means we don't
have a GIS database setup and that we bypass the city_exists check.
Maxime Petazzoni <http://www.bulix.org>
``One by one, the penguins took away my sanity.''
Linux kernel and software developer at MontaVista Software
Description: Digital signature
Re: [Maposmatic-dev] [PATCH 1/3] Style improvements, Thomas Petazzoni, 2009/09/09