details for django patch, modified StopLocation importer to LonLat

This commit is contained in:
Johnson Chetty 2012-02-03 11:54:44 +01:00
parent 63ed1f9674
commit a8b84d36a2
3 changed files with 6 additions and 2 deletions

3
README
View File

@ -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:

View File

@ -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()

View File

@ -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