小编Zae*_*eem的帖子

亚马逊SES与Flask Python

我刚开始在Flask上使用Python.我想了解使用Amazon SES从Flask发送电子邮件的最佳方式是什么?

我见过boto,但它是所有亚马逊服务的接口.我也看过其他一些自定义示例.

在Flask中发送电子邮件的最佳,简单和有效方法是什么?

谢谢.

python amazon-web-services flask amazon-ses

3
推荐指数
1
解决办法
1975
查看次数

"cakephp 3,保存不工作,未知类型"

这是链接CakePHP 3保存BelongsToMany关联未知类型""我以前的错误,但无法解决问题.

我有3张桌子:

  1. 预订
  2. 游客
  3. BookingsTravelers

当我将数据保存在预订表中时,我得到上面提到的错误,见下图:

在此输入图像描述

模型关联看起来像这样:

public function initialize(array $config)
{
    parent::initialize($config);

    $this->table('bookings_travelers');
    $this->displayField('name');
    $this->primaryKey('bPassID');

    $this->belongsTo('Bookings', [
        'foreignKey' => 'booking_id',
        'joinType' => 'INNER'
    ]);
    $this->belongsTo('Travelers', [
        'foreignKey' => 'traveler_id',
        'joinType' => 'INNER'
    ]);
}

public function initialize(array $config)
{

    parent::initialize($config);

    $this->table('bookings');
    $this->displayField('idbooking');
    $this->primaryKey('idbooking');

    $this->belongsTo('Users', [
        'foreignKey' => 'user_id',
        'joinType' => 'INNER'
    ]);


    $this->belongsToMany('Travelers', [
        'joinTable' => 'bookings_travelers',
    ]);
}

public function initialize(array $config)
{
    parent::initialize($config);

    $this->table('travelers');
    $this->displayField('name');
    $this->primaryKey('travelers_id');


    $this->belongsToMany('Bookings', [
        'joinTable' => 'bookings_travelers',
    ]); …
Run Code Online (Sandbox Code Playgroud)

cakephp-3.0

0
推荐指数
1
解决办法
1335
查看次数