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

Move placeholder uuids from file to database #627

Open
2 tasks
llewelld opened this issue Oct 5, 2023 · 1 comment
Open
2 tasks

Move placeholder uuids from file to database #627

llewelld opened this issue Oct 5, 2023 · 1 comment

Comments

@llewelld
Copy link
Collaborator

llewelld commented Oct 5, 2023

Summary

Currently the uuids and image filenames for the story carousel on the home page are read from the carousel.json file.

Although it makes sense (I think) to store the placeholder stories in a file (because they should be available for use even if the database is cleared) it would make much more if the uuids for the real stories were stored in the databse.

This has two benefits:

  1. They could be easily updated using the admin interface.
  2. If the story is wiped from the databse the uuid could be automatically removed as well.

What needs to be done?

  • Create a model to capture story uuids and image filenames. There doesn't have to be any associated form or UI.
  • Switch the get_carousel_stories() helper method to use the database entries rather than reading them from the stories entry in carousel.json.

Who can help?

  • Anyone will to hack the code.
@gedankenstuecke
Copy link
Member

I think I might have missed the image part (I guess the proposed changes include having little images for the carousel), but regardless of that: I had assumed we'd just need to store the UUIDs (which could have been in env variables) and then use a fixed-in-template placeholders otherwise.

Having said that, I have no strong opinion in either direction, but just wanted to offer an alternative solution that could avoid creating a model if we prefer to not have one 🙂

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

No branches or pull requests

2 participants