Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release:v0.2.3 #317

Merged
merged 9 commits into from
Oct 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

## [0.2.3] - 2024-10-20

- Add count of submissions to the Leaderboard of Hackathons.
- Fixed the password reset view to not validate the email address. (update the `django-allauth`)
- Improve Team Admin page to make it easier to adjust the team members.

## [0.2.2] - 2024-10-03

- Refreshing after 30 seconds the Students page when status="sent".
Expand Down
14 changes: 11 additions & 3 deletions portal/config/settings/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,7 @@
"django.contrib.auth.middleware.AuthenticationMiddleware",
"django.contrib.messages.middleware.MessageMiddleware",
"django.middleware.clickjacking.XFrameOptionsMiddleware",
"allauth.account.middleware.AccountMiddleware",
]

# STORAGES
Expand Down Expand Up @@ -597,14 +598,21 @@ class MediaRootS3Boto3Storage(S3Boto3Storage):
},
},
"loggers": {
"": {
"root": {
"handlers": ["console"],
"level": "DEBUG",
},
"parso": {
"handlers": ["console"],
"level": "WARNING",
"propagate": False,
},
"botocore": {
"level": "WARNING",
},
"urllib3": {
"level": "WARNING",
},
"s3transfer": {
"level": "WARNING",
},
},
}
Expand Down
90 changes: 9 additions & 81 deletions portal/poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions portal/portal/hackathons/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ class TeamAdmin(admin.ModelAdmin):
"hackathon",
)
list_filter = ("hackathon",)
filter_horizontal = ("users",)


@admin.register(models.Attendance)
Expand Down
6 changes: 5 additions & 1 deletion portal/portal/hackathons/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,11 @@ def get(
"created",
):
if submission.content_object not in submissions:
submissions[submission.content_object] = submission
count = models.Submission.objects.filter(
content_type=submission.content_type,
object_id=submission.object_id,
).count()
submissions[submission.content_object] = (submission, count)

context = self.get_context_data(object=self.object, submissions=submissions)

Expand Down
4 changes: 3 additions & 1 deletion portal/portal/templates/hackathons/leaderboard.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ <h1>Leaderboard</h1>
<th scope="col">Team</th>
<th scope="col">Name</th>
<th scope="col">Score</th>
<th scope="col">Submissions</th>
</tr>
</thead>
<tbody>
Expand All @@ -28,7 +29,8 @@ <h1>Leaderboard</h1>
</th>
<td>{{ obj.hackathon_team_id }}</td>
<td>{{ obj.name }}</td>
<td>{{ submission.score|floatformat:3 }}</td>
<td>{{ submission.0.score|floatformat:3 }}</td>
<td>{{ submission.1 }}</td>
</tr>
{% endfor %}
</tbody>
Expand Down
6 changes: 6 additions & 0 deletions portal/portal/users/adapters.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,12 @@ def is_open_for_signup(self, request: HttpRequest):

def clean_email(self, email):
email = super().clean_email(email)
request = getattr(self, "request", None)

# Skip unique email check if it's a password reset request
if request and request.path == reverse("account_reset_password"):
return email

if email and app_settings.UNIQUE_EMAIL:
if EmailAddress.objects.filter(email=email).exists():
raise ValidationError(
Expand Down
4 changes: 2 additions & 2 deletions portal/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "portal"
version = "0.2.2"
version = "0.2.3"
description = "LDSA Portal for running Starters Academy"
authors = [
"Hugo Castilho <[email protected]>",
Expand Down Expand Up @@ -35,14 +35,14 @@ crispy-bootstrap4 = "^2022.1"
# Django Dependencies
django = "^4.2.4"
django-anymail = "^10.1"
django-allauth = "^0.55.0"
django-compressor = "^4.4"
django-constance = {extras = ["database"], version = "^3.1.0"}
django-crispy-forms = "^2.0"
django-environ = "^0.10.0"
django-model-utils = "^4.3.1"
django-redis = "^5.3.0"
djangorestframework = "^3.14.0"
django-allauth = "^65.0.2"

[tool.poetry.group.prod.dependencies]
gunicorn = "^21.2.0"
Expand Down
Loading