From a8b84d36a2c71bd4899888bcdfb46dbad65151a2 Mon Sep 17 00:00:00 2001 From: Johnson Chetty Date: Fri, 3 Feb 2012 11:54:44 +0100 Subject: [PATCH] details for django patch, modified StopLocation importer to LonLat --- README | 3 +++ chaloBEST/imports/data_mapper.py | 4 ++-- requirements.txt | 1 + 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/README b/README index 8342383..2c1ef06 100644 --- a/README +++ b/README @@ -1,3 +1,6 @@ +Note: If running postgres 9.1 and Django < 1.4, you will probably need this patch for things to work: https://code.djangoproject.com/raw-attachment/ticket/16778/postgis-adapter-2.patch . Reasons are explained here: http://stackoverflow.com/questions/7667724/error-saving-geodjango-pointfield + + chaloBEST Get: diff --git a/chaloBEST/imports/data_mapper.py b/chaloBEST/imports/data_mapper.py index 1c0b72b..3850868 100644 --- a/chaloBEST/imports/data_mapper.py +++ b/chaloBEST/imports/data_mapper.py @@ -152,11 +152,11 @@ def StopLocation_save(entry): this_stop = Stop.objects.get(code=int(entry[4])) if entry[0] and entry[1]: - loc1 = StopLocation(stop=this_stop, point=Point(float(entry[0]), float(entry[1])),direction='U' ) + loc1 = StopLocation(stop=this_stop, point=Point(float(entry[1]), float(entry[0])),direction='U' ) loc1.save() if entry[2] and entry[3]: - loc2 = StopLocation(stop=this_stop, point=Point(float(entry[2]), float(entry[3])),direction='D' ) + loc2 = StopLocation(stop=this_stop, point=Point(float(entry[3]), float(entry[2])),direction='D' ) loc2.save() diff --git a/requirements.txt b/requirements.txt index cfe1372..c5bf053 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,5 @@ -e svn+http://code.djangoproject.com/svn/django/branches/releases/1.3.X/#egg=django +#-e svn+http://code.djangoproject.com/svn/django/trunk/#egg=django -e bzr+http://code.0x2620.org/python-ox/#egg=python-ox -e git+git://github.com/seatgeek/fuzzywuzzy.git#egg=fuzzywuzzy django_extensions