Skip to content

Commit

Permalink
Added AWS functionality that includes checking for AWS credentials, c…
Browse files Browse the repository at this point in the history
…reating an AWS bucket if it doesn't exist, and enabling users to send or resend project files to AWS as needed.
  • Loading branch information
Chrystinne committed Sep 25, 2023
1 parent 13be926 commit 1f092bb
Showing 1 changed file with 22 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -385,6 +385,28 @@ <h5 class="card-title mt-3 mb-1">Google Cloud</h5>
<p>If this message is here for a long time, check the Django "process_tasks"</p>
{% endif %}
</li>
<li class="list-group-item">
<h5 class="card-title mt-3 mb-1">AWS</h5>
{% if not has_aws_credentials %}
<p>You are missing the AWS credentials.</p>
{% elif not aws_bucket_exists %}
<p>Create a bucket on AWS to store the files associated with this project.</p>
<form action="" method="post">
{% csrf_token %}
<button class="btn btn-primary" name="aws-bucket" value='{{project.slug}}'
{% if rw_tasks %} disabled="disabled" {% endif %}
type="submit">Create AWS bucket and send files </button><br><br>
</form>
{% elif aws_bucket_exists %}
<p>The files have been sent to AWS. The bucket name is: {{s3_bucket_name}}.</p>
<form action="" method="post">
{% csrf_token %}
<button class="btn btn-primary" name="aws-bucket" value='{{project.slug}}'
{% if rw_tasks %} disabled="disabled" {% endif %}
type="submit">Resend files to AWS</button><br><br>
</form>
{% endif %}
</li>
</ul>

</div>
Expand Down

0 comments on commit 1f092bb

Please sign in to comment.