Skip to content

Commit f80539a

Browse files
committed
Added more explications of friends groups
1 parent 1711e75 commit f80539a

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

friends/templates/join_friends.html

+8-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,14 @@
33
{% block subtitle %}{% translate "Friends' group" %}{% endblock %}
44
{% block content %}
55
<h1>{% translate "Apply with friends" %}</h1>
6-
<p>{% translate "The friends group created is not required to be your final team for the hackathon." %}</p>
6+
<p>{% translate 'Please keep this in mind:' %}</p>
7+
<ul>
8+
<li>{% translate 'The friends group created is not required to be your final team for the hackathon.' %}</li>
9+
<li>{% translate 'If someone of the group is invited, the group will be closed and no one will be able to join.' %}</li>
10+
{% if friends_max_capacity is not None %}
11+
<li>{% translate 'Max group capacity:' %} {{ friends_max_capacity }}</li>
12+
{% endif %}
13+
</ul>
714
<form method="post" id="invite-form">
815
{% csrf_token %}
916
{% include 'components/bootstrap5_form.html' with form=friends_form %}

friends/views.py

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
from django.conf import settings
12
from django.contrib import messages
23
from django.db import Error, transaction
34
from django.http import HttpResponseBadRequest
@@ -42,6 +43,7 @@ def get_context_data(self, **kwargs):
4243
context.update({"friends_code": friends_code})
4344
except FriendsCode.DoesNotExist:
4445
context.update({"friends_form": FriendsForm()})
46+
context.update({'friends_max_capacity': getattr(settings, 'FRIENDS_MAX_CAPACITY', None)})
4547
return context
4648

4749
def post(self, request, **kwargs):

0 commit comments

Comments
 (0)