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

Added: Add SponsorImage model and update FooterConfig model #1188

Merged
merged 6 commits into from
Jul 24, 2024

Conversation

drikusroor
Copy link
Contributor

@drikusroor drikusroor commented Jul 15, 2024

This pull request adds a new model called SponsorImage and updates the FooterConfig model in the backend/theme app. The SponsorImage model represents an image associated with a footer configuration, and it includes fields for the index, footer configuration, and image. The FooterConfig model now uses the SponsorImage model through a many-to-many relationship for the logos field and allows the user to sort the images using the index property.

The backend supplies the images in a sorted list to the frontend, which means no code had to be changed in the frontend.

Additionally, the django-nested-admin had to be installed in order to make nested inline forms possible.

With drag and drop sorting!

Screen.Recording.2024-07-16.at.11.41.48.mov

Resolves #1121

@drikusroor drikusroor self-assigned this Jul 15, 2024
@drikusroor drikusroor marked this pull request as ready for review July 16, 2024 08:53
@drikusroor drikusroor requested review from Evert-R and BeritJanssen and removed request for Evert-R July 16, 2024 09:01
@drikusroor drikusroor force-pushed the feat/1121-order-footer-sponsor-images branch from 4bdbc2a to 5d1b2e0 Compare July 19, 2024 13:30
@drikusroor drikusroor force-pushed the feat/1121-order-footer-sponsor-images branch from 5d1b2e0 to c9a4227 Compare July 24, 2024 09:03
This commit adds a new model called SponsorImage and updates the FooterConfig model in the backend/theme app. The SponsorImage model represents an image associated with a footer configuration, and it includes fields for the index, footer configuration, and image. The FooterConfig model now uses the SponsorImage model through a many-to-many relationship for the logos field. This change allows multiple images to be associated with a footer configuration.
…orImage through model and should also be tested for correct sorting using the index field
@drikusroor drikusroor force-pushed the feat/1121-order-footer-sponsor-images branch from c9a4227 to ec946f2 Compare July 24, 2024 09:59
@drikusroor drikusroor merged commit 4da5122 into develop Jul 24, 2024
10 checks passed
@drikusroor drikusroor deleted the feat/1121-order-footer-sponsor-images branch July 24, 2024 10:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow ordering of logos in theme footer
2 participants