Skip to content

Instantly share code, notes, and snippets.

@crooksey
Created March 21, 2018 08:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save crooksey/0d5c0fbc60f0670e8525db72eadeb000 to your computer and use it in GitHub Desktop.
Save crooksey/0d5c0fbc60f0670e8525db72eadeb000 to your computer and use it in GitHub Desktop.
class TAAbsence(BaseRW):
__tablename__= 'ta_absences'
id = Column(Integer, primary_key=True)
user_id = Column(Integer, ForeignKey('ta_users.id'), nullable=False)
start_date = Column(Date, nullable=False)
end_date = Column(Date, nullable=False)
# so an example TAAbsence
user_id = 1
start_date = 2018-03-20
end_date = 2018-03-23
#
date_today = 2018-03-21
# Build ORM query that looks for all TAAbsence results that span over (and including) today.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment