Skip to content

Commit

Permalink
CONCD-680 move the field in the Django admin to be below the Image fi…
Browse files Browse the repository at this point in the history
…le selection (#2299)
  • Loading branch information
rasarkar authored Feb 29, 2024
1 parent d585586 commit 114a6ed
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
19 changes: 19 additions & 0 deletions concordia/admin/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,25 @@ class CampaignAdmin(admin.ModelAdmin, CustomListDisplayFieldsMixin):
"completed_date",
)
list_display_links = ("title",)
fields = (
"published",
"unlisted",
"status",
"next_transcription_campaign",
"next_review_campaign",
"ordering",
"display_on_homepage",
"title",
"slug",
"card_family",
"thumbnail_image",
"image_alt_text",
"launch_date",
"completed_date",
"description",
"short_description",
"metadata",
)
prepopulated_fields = {"slug": ("title",)}
raw_id_fields = ("card_family",)
search_fields = ["title", "description"]
Expand Down
2 changes: 1 addition & 1 deletion concordia/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -258,10 +258,10 @@ class Status(models.IntegerChoices):
card_family = models.ForeignKey(
CardFamily, on_delete=models.CASCADE, blank=True, null=True
)
image_alt_text = models.TextField(blank=True, null=True)
thumbnail_image = models.ImageField(
upload_to="campaign-thumbnails", blank=True, null=True
)
image_alt_text = models.TextField(blank=True, null=True)

launch_date = models.DateField(null=True, blank=True)
completed_date = models.DateField(null=True, blank=True)
Expand Down

0 comments on commit 114a6ed

Please sign in to comment.