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

Add release_report_cover_image to Version #1483

Draft
wants to merge 1 commit into
base: develop
Choose a base branch
from
Draft
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
10 changes: 9 additions & 1 deletion templates/admin/release_report_detail.html
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,15 @@ <h1>Boost</h1>
</table>
{% endif %}
</div>
<div class="flex flex-col">
<div class="flex flex-col h-full gap-y-4">

{% if version.release_report_cover_image.url %}
<img
class="max-h-[60%]"
src="{{ version.release_report_cover_image.url }}"
alt="release report cover image"
>
{% endif %}

{% if contribution_box_graph %}
<div class="flex flex-col gap-y-4">
Expand Down
20 changes: 20 additions & 0 deletions versions/migrations/0013_version_release_report_cover_image.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Generated by Django 4.2.16 on 2024-11-21 20:22

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
("versions", "0012_review_reviewresult"),
]

operations = [
migrations.AddField(
model_name="version",
name="release_report_cover_image",
field=models.ImageField(
blank=True, null=True, upload_to="release_report_cover/"
),
),
]
5 changes: 5 additions & 0 deletions versions/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,11 @@ class Version(models.Model):
"beta release or a development version",
)
data = models.JSONField(default=dict)
release_report_cover_image = models.ImageField(
null=True,
blank=True,
upload_to="release_report_cover/",
)

objects = VersionManager()

Expand Down