本文整理汇总了Python中DataBase.getFilmAanbieder方法的典型用法代码示例。如果您正苦于以下问题:Python DataBase.getFilmAanbieder方法的具体用法?Python DataBase.getFilmAanbieder怎么用?Python DataBase.getFilmAanbieder使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DataBase
的用法示例。
在下文中一共展示了DataBase.getFilmAanbieder方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: setData
# 需要导入模块: import DataBase [as 别名]
# 或者: from DataBase import getFilmAanbieder [as 别名]
def setData(self, data):
apis = Api()
db = DataBase()
movie_list = apis.getMovieList(apis.getCurrentTime())
col = 0
date = apis.getCurrentTime()
geenfilm = True
for titel in movie_list:
if db.checkFilmAanbieder(titel['titel'], date):
images = ImageTk.PhotoImage(Image.open(str(titel['image'])))
b1 = tk.Button(self,
command=lambda controller=self.controller, titel=titel: self.details(controller, titel),
image=images, height=290,
width=168)
b1.grid(row=3, column=col, pady=25, padx=10)
# save the button image from garbage collection!
b1.image = images
tijd = datetime.datetime.fromtimestamp(int(titel['starttijd']))
titel['aanbieder'] = db.getFilmAanbieder(titel['titel'], date)
titelbtn = tk.Button(self,
command=lambda controller=self.controller, titel=titel: self.details(controller,
titel),
text=titel['titel'],
font=("Tahoma", 10, "bold"), bg=FL_BG_COLOR, fg=FL_TEXT_COLOR, relief="flat",
activebackground=FL_BG_COLOR, activeforeground=FL_TEXT_COLOR)
titelbtn.grid(row=4, column=col)
starttijd = tk.Label(self, text=str(tijd), font=FL_BASE_FONT, bg=FL_BG_COLOR, fg=FL_TEXT_COLOR)
starttijd.grid(row=5, column=col)
aanbieders = tk.Label(self, text=titel['aanbieder'], font=FL_BASE_FONT, bg=FL_BG_COLOR,
fg=FL_TEXT_COLOR)
aanbieders.grid(row=6, column=col)
col += 1
geenfilm = False
if geenfilm:
if apis.getError() != '':
label = tk.Label(self, text=apis.getError(), font=FL_BASE_FONT,
bg=FL_BG_COLOR, fg=FL_TEXT_COLOR)
label.grid(row=3, column=0, sticky='w', padx=25, columnspan=5)
elif db.getError() != '':
label = tk.Label(self, text=db.getError(), font=FL_BASE_FONT,
bg=FL_BG_COLOR, fg=FL_TEXT_COLOR)
label.grid(row=3, column=0, sticky='w', padx=25, columnspan=5)
else:
label = tk.Label(self, text="Er zijn geen aanbieders die een film aanbieden", font=FL_BASE_FONT,
bg=FL_BG_COLOR, fg=FL_TEXT_COLOR)
label.grid(row=3, column=0, sticky='w', padx=25, columnspan=5)