merged
This commit is contained in:
commit
bc3fe8ad2e
|
@ -84639,10 +84639,10 @@ trip_id,arrival_time,departure_time,stop_id,stop_sequence
|
|||
5261_4703_FW_DOWN,26:57:50,26:58:00,2640,18
|
||||
5261_4703_FW_DOWN,26:59:29,26:59:39,1837,19
|
||||
5261_4703_FW_DOWN,,,2714,20
|
||||
5261_4703_FW_DOWN,03:04:27,03:04:37,353,21
|
||||
5261_4703_FW_DOWN,27:04:27,27:04:37,353,21
|
||||
5261_4703_FW_DOWN,,,352,22
|
||||
5261_4703_FW_DOWN,,,351,23
|
||||
5261_4703_FW_DOWN,03:09:00,03:09:10,350,24
|
||||
5261_4703_FW_DOWN,27:09:00,27:09:10,350,24
|
||||
3881_4695_HOL_UP,07:02:00,07:02:00,318,1
|
||||
3881_4695_HOL_UP,,,331,2
|
||||
3881_4695_HOL_UP,,,1175,3
|
||||
|
|
|
@ -172,15 +172,15 @@ def fix_missing_headways():
|
|||
# try to use the previous column....if available
|
||||
#if getattr(schedule, column): continue
|
||||
if col_idx > 0:
|
||||
prev_headway = getattr(schedule, columns[col_idx-1])
|
||||
prev_headway = getattr(schedule, hcolumns[col_idx-1])
|
||||
if prev_headway:
|
||||
setattr(schedule, column, prev_headway)
|
||||
schedule.save()
|
||||
continue
|
||||
|
||||
# ... or the next column, if it comes to that.
|
||||
if col_idx < len(columns)-1:
|
||||
next_headway = getattr(schedule, columns[col_idx+1])
|
||||
if col_idx < len(hcolumns)-1:
|
||||
next_headway = getattr(schedule, hcolumns[col_idx+1])
|
||||
if next_headway:
|
||||
setattr(schedule, column, next_headway)
|
||||
schedule.save()
|
||||
|
|
|
@ -214,6 +214,11 @@ def importUniqueRoutes():
|
|||
stopErrorsFile.write(json.dumps(stopErrors, indent=2))
|
||||
stopErrorsFile.close()
|
||||
|
||||
def do():
|
||||
csvToJSON()
|
||||
processJSON()
|
||||
importUniqueRoutes()
|
||||
|
||||
'''
|
||||
>>>formatTime("06.40")
|
||||
>>>time(6,40)
|
||||
|
|
|
@ -194,7 +194,8 @@ class DepotAdmin(admin.ModelAdmin):
|
|||
|
||||
|
||||
class HolidayAdmin(admin.ModelAdmin):
|
||||
list_display = ("date", "name")
|
||||
list_display = ("date", "name","operating_schedule")
|
||||
list_editable = ("operating_schedule",)
|
||||
readonly_fields = ("date", "name")
|
||||
search_fields = ("name", "date")
|
||||
formfield_overrides = {
|
||||
|
|
|
@ -414,6 +414,7 @@ class Depot(models.Model):
|
|||
class Holiday(models.Model):
|
||||
date = models.DateField()
|
||||
name = models.TextField(max_length=100)
|
||||
operating_schedule=models.TextField(max_length=20)
|
||||
|
||||
def __unicode__(self):
|
||||
return self.name
|
||||
|
|
3
sqldiff/sqldiff05102012.sql
Normal file
3
sqldiff/sqldiff05102012.sql
Normal file
|
@ -0,0 +1,3 @@
|
|||
ALTER TABLE "mumbai_holiday"
|
||||
ADD "operating_schedule" text;
|
||||
COMMIT;
|
Loading…
Reference in New Issue
Block a user