On Fri, 4 May 2018, Karsten Hilbert wrote:
> Ask yourself a question: What to you expect the value of
> site_name to be in the line
> self.panel1 = ...
Karsten,
The name or ID number of a sampling location in the sites database table.
If the database table is empty there is no instance or value for any of the
variables. That table is a SQLAlchemy class in models.py:
class Sites(Base):
__tablename__ = 'locations'
site_id = Column(Integer, Sequence('site_id_seq'), primary_key=True)
site_name = Column(String(16), nullable=False)
data_type = Column(String(12), nullable=False, CheckConstraint('Biogical', 'Chemical', 'Microbial', 'Physical', 'Multiple'))
source = Column(String(64))
lat = Column(String(9))
lon = Column(String(9))
stream = Column(String(32))
basin = Column(String(32))
comment = Column(String)
def __repr__(self):
return "<Locations(site_name='%s', site_description='%s', source='%s', lat='%s', lon='%s', comment='%s'>" % (
self.site_name, self.site_desc, self.source, self.lat, self.lon, self.comment)
Rich