Skip to content

Commit

Permalink
Merge branch 'main' into seo-tags
Browse files Browse the repository at this point in the history
  • Loading branch information
imApoorva36 authored Feb 24, 2024
2 parents 65c9ba5 + e7bdef8 commit 1d6fc42
Show file tree
Hide file tree
Showing 13 changed files with 114 additions and 39 deletions.
8 changes: 4 additions & 4 deletions corpus/corpus/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,10 +149,10 @@

STATIC_URL = "static/"
STATICFILES_DIRS = [BASE_DIR / "templates/static"]
if not DEBUG:
STATIC_ROOT = os.path.join(BASE_DIR, "static")
else:
MEDIA_ROOT = os.path.join(BASE_DIR, "templates/static")
STATIC_ROOT = os.path.join(BASE_DIR, "static")

MEDIA_URL = "media/"
MEDIA_ROOT = os.path.join(BASE_DIR, "media")

# Default primary key field type
# https://docs.djangoproject.com/en/4.2/ref/settings/#default-auto-field
Expand Down
8 changes: 6 additions & 2 deletions corpus/impulse/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -485,12 +485,14 @@ def mark_payment_complete(request, pk):
team = Team.objects.get(pk=pk)
team.payment_status = "P"
team.save()
payment_status = "Complete"
final_message = "Thanks for registering for Impulse!"
for member in ImpulseUser.objects.filter(team=team):
if member.user.email is not None:
send_email(
"Payment Complete | Impulse",
"emails/impulse/payment_complete.html",
{"team": team, "user": member.user},
{"team": team, "user": member.user, "payment_status": payment_status, "final_message": final_message},
bcc=[member.user.email],
)
messages.success(
Expand All @@ -505,12 +507,14 @@ def mark_payment_incomplete(request, pk):
team = Team.objects.get(pk=pk)
team.payment_status = "U"
team.save()
payment_status = "Incomplete"
final_message = "Please contact us if you have any questions."
for member in ImpulseUser.objects.filter(team=team):
if member.user.email is not None:
send_email(
"Payment Incomplete | Impulse",
"emails/impulse/payment_incomplete.html",
{"team": team, "user": member.user},
{"team": team, "user": member.user, "payment_status": payment_status, "final_message": final_message},
bcc=[member.user.email],
)
messages.success(request, "Successfully marked payment as incomplete!")
Expand Down
8 changes: 6 additions & 2 deletions corpus/robotrix/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -487,12 +487,14 @@ def mark_payment_complete(request, pk):
team = Team.objects.get(pk=pk)
team.payment_status = "P"
team.save()
payment_status="Complete"
final_message="Thanks for registering for Robotrix."
for member in RobotrixUser.objects.filter(team=team):
if member.user.email is not None:
send_email(
"Payment Complete | Robotrix",
"emails/robotrix/payment_complete.html",
{"team": team, "user": member.user},
{"team": team, "user": member.user, "payment_status": payment_status, "final_message": final_message},
bcc=[member.user.email],
)
messages.success(
Expand All @@ -507,12 +509,14 @@ def mark_payment_incomplete(request, pk):
team = Team.objects.get(pk=pk)
team.payment_status = "U"
team.save()
payment_status="Incomplete"
final_message="Please contact us if you have any questions."
for member in RobotrixUser.objects.filter(team=team):
if member.user.email is not None:
send_email(
"Payment Incomplete | Robotrix",
"emails/robotrix/payment_incomplete.html",
{"team": team, "user": member.user},
{"team": team, "user": member.user, "payment_status": payment_status, "final_message": final_message},
bcc=[member.user.email],
)
messages.success(request, "Successfully marked payment as incomplete!")
Expand Down
13 changes: 0 additions & 13 deletions corpus/templates/emails/impulse/payment_complete.html

This file was deleted.

13 changes: 0 additions & 13 deletions corpus/templates/emails/impulse/payment_incomplete.html

This file was deleted.

13 changes: 13 additions & 0 deletions corpus/templates/emails/impulse/payment_update.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{% extends 'emails/base.html' %}

{% block title %}
Payment status Updated
{% endblock %}

{% block content %}
<h1>Hi {{ user }},</h1>

<p>Your payment status for Robotrix has been updated to <strong>{{ payment_status }}</strong>.</p>

<p>{{ final_message }}</p>
{% endblock %}
17 changes: 17 additions & 0 deletions corpus/templates/emails/robotrix/announcement.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{% extends 'emails/base.html' %}

{% block title %}
Announcement | Robotrix
{% endblock %}

{% block content %}
<h1>Announcement - Robotrix</h1>
<div style="font-size: 1.2em;">
{{ announcement.content | linebreaks }}
</div>
{% if announcement.url_link %}
<p>
<a href="{{ announcement.url_link }}">{{ announcement.url_link_text }}</a>
</p>
{% endif %}
{% endblock %}
13 changes: 13 additions & 0 deletions corpus/templates/emails/robotrix/payment_update.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{% extends 'emails/base.html' %}

{% block title %}
Payment status Updated
{% endblock %}

{% block content %}
<h1>Hi {{ user }},</h1>

<p>Your payment status for Robotrix has been updated to <strong>{{ payment_status }}</strong>.</p>

<p>{{ final_message }}</p>
{% endblock %}
4 changes: 2 additions & 2 deletions corpus/templates/robotrix/home.html
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@ <h3 class="title text-xl md:text-2xl lg:text-3xl font-extrabold ">SCHEDULE</h3>
"
class="bg-base-200 pt-20 pb-12 lg:pt-[120px] lg:pb-[90px]">
<div class="container mx-auto">
<div class="flex flex-wrap -mx-4">
<div class="flex flex-wrap mx-4">
<div class="w-full px-4">
<div class="mx-auto mb-[60px] max-w-[520px] text-center lg:mb-20">
<span class="block mb-2 text-lg md:text-xl lg:text-2xl font-semibold text-primary">
Expand All @@ -372,7 +372,7 @@ <h3 class="title text-xl md:text-2xl lg:text-3xl font-extrabold ">SCHEDULE</h3>
</div>
</div>
</div>
<div class="flex flex-wrap -mx-4">
<div class="flex flex-wrap mx-4">
<div class="w-full px-4 lg:w-1/2">
<div
class="w-full p-4 mb-8 rounded-lg bg-base-100 shadow-[0px_20px_95px_0px_rgba(0,0,0,0.30)] sm:p-8 lg:px-6 xl:px-8"
Expand Down
15 changes: 12 additions & 3 deletions corpus/templates/robotrix/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,16 @@ <h3 class="font-bold text-lg">Edit Team</h3>
</div>
</div>


{% if team.payment_status == "P" or team.payment_status == "E" %}
<div class="flex justify-between items-center w-1/2 mx-auto">
<h4> Join the Whatsapp Group</h4>
<a href="https://chat.whatsapp.com/KuoxyXxpqZqLcN7r1eywXg" target="_blank" class="text-blue-500">
<svg xmlns="http://www.w3.org/2000/svg" x="0px" y="0px" width="100" height="100" viewBox="0 0 100 100">
<path fill="#ee3e54" d="M13 27A2 2 0 1 0 13 31A2 2 0 1 0 13 27Z"></path><path fill="#f1bc19" d="M77 12A1 1 0 1 0 77 14A1 1 0 1 0 77 12Z"></path><path fill="#fce0a2" d="M50 13A37 37 0 1 0 50 87A37 37 0 1 0 50 13Z"></path><path fill="#f1bc19" d="M83 11A4 4 0 1 0 83 19A4 4 0 1 0 83 11Z"></path><path fill="#ee3e54" d="M87 22A2 2 0 1 0 87 26A2 2 0 1 0 87 22Z"></path><path fill="#fbcd59" d="M81 74A2 2 0 1 0 81 78 2 2 0 1 0 81 74zM15 59A4 4 0 1 0 15 67 4 4 0 1 0 15 59z"></path><path fill="#ee3e54" d="M25 85A2 2 0 1 0 25 89A2 2 0 1 0 25 85Z"></path><path fill="#fff" d="M18.5 51A2.5 2.5 0 1 0 18.5 56A2.5 2.5 0 1 0 18.5 51Z"></path><path fill="#f1bc19" d="M21 66A1 1 0 1 0 21 68A1 1 0 1 0 21 66Z"></path><path fill="#fff" d="M80 33A1 1 0 1 0 80 35A1 1 0 1 0 80 33Z"></path><path fill="#add4a1" d="M51.5,25C38.5,25,28,35.5,28,48.5c0,4.5,1.2,8.6,3.4,12.2L28,71.1l10.1-3.3c3.8,2.7,8.4,4.2,13.4,4.2 C64.5,72,75,61.5,75,48.5S64.5,25,51.5,25z"></path><path fill="#472b29" d="M51.5,72.7c-4.9,0-9.5-1.4-13.5-4.1l-9.7,3.2c-0.3,0.1-0.5,0-0.7-0.2c-0.2-0.2-0.3-0.5-0.2-0.7l3.3-10.1 c-2.2-3.7-3.3-7.9-3.3-12.3c0-13.3,10.9-24.2,24.2-24.2s24.2,10.9,24.2,24.2S64.8,72.7,51.5,72.7z M38.1,67.1c0.1,0,0.3,0,0.4,0.1 c3.8,2.7,8.3,4.1,13,4.1c12.6,0,22.8-10.2,22.8-22.8c0-12.6-10.2-22.8-22.8-22.8c-12.6,0-22.8,10.2-22.8,22.8 c0,4.2,1.1,8.3,3.3,11.8c0.1,0.2,0.1,0.4,0.1,0.6L29.1,70l8.7-2.9C37.9,67.1,38,67.1,38.1,67.1z"></path><path fill="#5aba9e" d="M66.6,37.1c-3.5-4.5-8.9-7.5-15.1-7.5c-10.4,0-18.9,8.5-18.9,18.9c0,3.9,1.2,7.6,3.3,10.6l-2,6.2l6-1.9 c3.2,2.5,7.3,4.1,11.7,4.1c10.4,0,18.9-8.5,18.9-18.9c0-1.1-0.1-2.1-0.3-3.2"></path><path fill="#472b29" d="M51.5,67.9c-4.3,0-8.4-1.4-11.8-4L34,65.8c-0.2,0.1-0.4,0-0.5-0.1c-0.1-0.1-0.2-0.3-0.1-0.5l1.9-6 c-2.1-3.2-3.2-6.9-3.2-10.7c0-10.7,8.7-19.4,19.4-19.4c6.1,0,11.8,2.8,15.5,7.7c0.2,0.2,0.1,0.5-0.1,0.7c-0.2,0.2-0.5,0.1-0.7-0.1 c-3.5-4.6-8.9-7.3-14.7-7.3c-10.1,0-18.4,8.3-18.4,18.4c0,3.7,1.1,7.3,3.2,10.3c0.1,0.1,0.1,0.3,0.1,0.4l-1.7,5.3l5-1.6 c0.2-0.1,0.3,0,0.5,0.1c3.3,2.6,7.2,4,11.4,4c10.1,0,18.4-8.3,18.4-18.4c0-1-0.1-2.1-0.3-3.1c0-0.3,0.1-0.5,0.4-0.6 c0.3,0,0.5,0.1,0.6,0.4c0.2,1.1,0.3,2.2,0.3,3.2C70.9,59.2,62.2,67.9,51.5,67.9z"></path><g><path fill="#5aba9e" d="M69.5,42.6c-0.4-1.1-0.9-2.2-1.4-3.3"></path><path fill="#472b29" d="M69.5,43.1c-0.2,0-0.4-0.1-0.5-0.3c-0.4-1.1-0.8-2.2-1.4-3.2c-0.1-0.2,0-0.5,0.2-0.7c0.2-0.1,0.5,0,0.7,0.2 c0.6,1.1,1.1,2.2,1.5,3.3c0.1,0.3-0.1,0.5-0.3,0.6C69.6,43.1,69.5,43.1,69.5,43.1z"></path></g><g><path fill="#fdfcee" d="M59.1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.2-0.6-1.3-1.2-2.6l-0.2-0.5l-0.6-1.3c-0.1-0.3-0.3-0.6-0.5-0.8c-0.2-0.2-0.4-0.3-0.6-0.3C44.5,36.1,44.4,36.1,44.4,36.1 L44.4,36.1z"></path></g>
</svg>
</a>
</div>
{% endif %}

{% if team.payment_status == "U" %}
<div class="alert alert-info my-2 rounded-none">
Expand All @@ -130,9 +139,9 @@ <h3 class="font-bold text-lg">Edit Team</h3>
d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"></path>
</svg>
<span>
Please pay the fee of <strong>Rs. 150</strong> <a href="https://in.explara.com/e/robotrix-2024">here </a>. If you have already paid the fee, it might take some time for it to be updated here. Please only contact us if it has not been updated for more than a week.
Please pay the fee of <strong>Rs. 150</strong> <a href="https://in.explara.com/e/ieee-nitk-robotrix-2024">here </a>. If you have already paid the fee, it might take some time for it to be updated here. Please only contact us if it has not been updated for more than a week.
</span>
</div>
</div>
{% endif %}
<div class="rounded-lg p-3 flex flex-col gap-2">
<div class="flex justify-between items-center">
Expand Down
34 changes: 34 additions & 0 deletions corpus/templates/skyward_expedition/home.html
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,40 @@ <h2 class="text-4xl font-bold text-center my-5 text-black">

<hr class="h-px bg-white border-0">

<!-- FAQs -->
<div class="px-5 py-5 bg-sky-200">
<h2 class="text-4xl font-bold text-center my-5 text-black">
FAQs
</h2>
<div tabindex="0" class="collapse border border-sky-700 bg-sky-300 text-black w-11/12 md:w-1/2 mx-auto">
<div class="collapse-title text-xl font-black">
Are participants required to build the model?
</div>
<div class="collapse-content">
<p>
As stated in the rulebook, participants are required to submit one zipped file containing the step
file of their model, CFD simulation file and accompanying explanatory documents. Participants are
not required to build any physical models.
</p>
</div>
</div>

<div tabindex="0" class="collapse border border-sky-700 bg-sky-300 text-black w-11/12 md:w-1/2 mx-auto mt-4">
<div class="collapse-title text-xl font-black">
Do the participants need to conduct a CFD study?
</div>
<div class="collapse-content">
<p>
Yes, participants need to conduct a CFD study on their model using legally licensed software and
submit all simulation related files. The parameters of the CFD study will be updated shortly in the
Rule Book along with the required format of the simulation related files.
</p>
</div>
</div>
</div>

<hr class="h-px bg-white border-0">

<!-- About Boeing -->
<div class="px-5 py-5 bg-sky-200">
<h2 class="text-4xl font-bold text-center my-5 text-black">
Expand Down
4 changes: 4 additions & 0 deletions nginx/default.conf
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,8 @@ server {
location /static {
alias /etc/nginx/staticfiles;
}

location /media {
alias /etc/nginx/mediafiles;
}
}
3 changes: 3 additions & 0 deletions prod-docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ services:
- corpus_network
volumes:
- static_files:/corpus/static
- media_files:/corpus/media
depends_on:
postgres:
condition: service_healthy
Expand All @@ -62,6 +63,7 @@ services:
- "443:443"
volumes:
- static_files:/etc/nginx/staticfiles
- media_files:/etc/nginx/mediafiles
- certbot_etc:/etc/letsencrypt
- certbot_var:/var/lib/letsencrypt
- certbot_www:/var/www/certbot
Expand All @@ -88,6 +90,7 @@ networks:

volumes:
static_files:
media_files:
postgres_data:
certbot_etc:
certbot_var:
Expand Down

0 comments on commit 1d6fc42

Please sign in to comment.