我已经将 docker-compose 设置为我的 Django 应用程序的 python 解释器,第一次一切都按预期工作,但是当我在出现requirements.txt问题的情况下添加新需求时,首先我收到一条消息,说明该需求已成功安装并且然后收到此消息
Couldn't refresh skeletons for remote interpreter
com.github.dockerjava.api.exception.NotModifiedException:
caused by:
com.github.dockerjava.api.exception.NotModifiedException:
Run Code Online (Sandbox Code Playgroud)
之后我不断看到警告告诉我要求尚未得到满足。
我的 docker-compose 解释器如下所示:
它似乎唯一有效的方法是:
docker-compose build 在我看来,这些都不是好的解决方案,我认为它应该直接从 IDE 运行,那么是否需要执行任何额外的配置才能使其正常运行
在我的工作中,我被告知需要使用Fedora,我使用vs代码,当我想更新时,我被重定向到下载.tar.gz文件。什么是安装较新版本的正确方法?
我正在使用phpmailer发送具有以下功能的电子邮件:
function send_email($address, $message){
$mail = new PHPMailer;
$mail->SMTPDebug = 3;
$mail->isSMTP();
$mail->Host = "smtp.gmail.com";
$mail->SMTPAuth = true;
$mail->Username = "name@gmail.com";
$mail->Password = "password";
$mail->SMTPSecure = "tls";
$mail->Port = 587;
$mail->From = "name@gmail.com";
$mail->FromName = "Name";
$mail->addAddress($address, "Cust. name");
$mail->isHTML(true);
$mail->Subject = "Nueva clave";
$mail->Body = "<i>".$message."</i>";
$mail->AltBody = "This is yout password.";
if($mail->send())
{
return true;
}else{
return false;
}
}
Run Code Online (Sandbox Code Playgroud)
在我的php文件中,我以这种方式设置了响应标头:
header('Content-Type: application/json');在需要进行处理之后,我以这种方式处理电子邮件:
if(send_email('customer@gmail.com', $message))
{
array_push($response, 'email sent');
array_push($response, $new_password);
echo json_encode(array('errors'=>$errors, 'response' => $response));
} …Run Code Online (Sandbox Code Playgroud)