from albumy.notifications import push_new_follower_notifications
改为:
from albumy.notifications import push_follow_notifications
P545: 第二个代码块上方的「bluelog 程序包」改为「sayhello 程序包」
P595 倒数第二个代码块第一行:
$ heroku login
改为:
$ heroku login -i
同时该代码块下面的附注段落前面插入一句话:「不添加 -i 选项将会打开浏览器进行登陆操作。」
P610 代码清单 15-3 第三行:
def init_app(app):
改为:
def init_app(self, app):
P613 代码清单 15-7 第七行及其下面四行和源码不一致:
platform = request.user_agent.platform
mobile_pattern = re.compile('android|fennec|iemobile|iphone|opera (?:mini|mobi)')
m = re.match(mobile_pattern, platform)
if m is not None:
return ''
改为:
platform = request.user_agent.platform
if platform is not None:
mobile_pattern = re.compile('android|fennec|iemobile|iphone|opera (?:mini|mobi)')
m = re.match(mobile_pattern, platform)
if m is not None:
return ''