Mercurial Hosting > traffic-intelligence
changeset 955:a15e843af55a
correcting errors in metadata names for backrefs
author | Nicolas Saunier <nicolas.saunier@polymtl.ca> |
---|---|
date | Tue, 15 Aug 2017 16:15:27 -0400 |
parents | 030b16ab4f64 |
children | 196a1fd498ba |
files | python/metadata.py |
diffstat | 1 files changed, 8 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/python/metadata.py Fri Jul 28 13:50:42 2017 -0400 +++ b/python/metadata.py Tue Aug 15 16:15:27 2017 -0400 @@ -91,7 +91,7 @@ description = Column(String) # eg sunny, before, after siteIdx = Column(Integer, ForeignKey('sites.idx')) - site = relationship("Site", backref=backref('environmental_factors', order_by = idx)) + site = relationship("Site", backref = backref('environmentalFactors')) def __init__(self, startTime, endTime, description, site): 'startTime is passed as string in utils.datetimeFormat, eg 2011-06-22 10:00:39' @@ -187,8 +187,8 @@ maskFilename = Column(String) # path to mask file, relative to site name virtual = Column(Boolean) # indicates it is not a real camera view, eg merged - site = relationship("Site", backref=backref('sites', order_by = idx)) - cameraType = relationship('CameraType', backref=backref('camera_types', order_by = idx)) + site = relationship("Site", backref = backref('cameraViews')) + cameraType = relationship('CameraType', backref = backref('cameraViews')) def __init__(self, description, homographyFilename, site, cameraType, trackingConfigurationFilename, maskFilename, virtual = False): self.description = description @@ -226,9 +226,9 @@ # class Alignment(Base): # __tablename__ = 'alignments' # idx = Column(Integer, primary_key=True) -# cameraViewIdx = Column(Integer, ForeignKey('camera_views.idx')) # should be sites?? +# siteIdx = Column(Integer, ForeignKey('sites.idx')) -# cameraView = relationship("CameraView", backref=backref('alignments', order_by = idx)) +# cameraView = relationship("Site", backref = backref('alignments')) # def __init__(self, cameraView): # self.cameraView = cameraView @@ -240,7 +240,7 @@ # x = Column(Float) # y = Column(Float) -# alignment = relationship("Alignment", backref=backref('alignments', order_by = index)) +# alignment = relationship("Alignment", backref = backref('points', order_by = index)) # def __init__(self, alignmentIdx, index, x, y): # self.alignmentIdx = alignmentIdx @@ -258,7 +258,7 @@ virtual = Column(Boolean) # indicates it is not a real video sequence (no video file), eg merged cameraViewIdx = Column(Integer, ForeignKey('camera_views.idx')) - cameraView = relationship("CameraView", backref=backref('camera_views', order_by = idx)) + cameraView = relationship("CameraView", backref = backref('videoSequences', order_by = idx)) def __init__(self, name, startTime, duration, cameraView, databaseFilename = None, virtual = False): '''startTime is passed as string in utils.datetimeFormat, eg 2011-06-22 10:00:39 @@ -317,7 +317,7 @@ maskFilename = Column(String) # path to mask file (can be different from camera view, for annotations), relative to site name undistorted = Column(Boolean) # indicates whether the annotations were done in undistorted video space - videoSequence = relationship("VideoSequence", backref=backref('video_sequences', order_by = idx)) + videoSequence = relationship("VideoSequence", backref = backref('trackingAnnotations')) def __init__(self, description, groundTruthFilename, firstFrameNum, lastFrameNum, videoSequence, maskFilename, undistorted = True): self.description = description