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

Question: when should date be used versus modified_date? #83

Open
stuartmaxwell opened this issue Nov 27, 2024 · 0 comments
Open

Question: when should date be used versus modified_date? #83

stuartmaxwell opened this issue Nov 27, 2024 · 0 comments
Assignees
Labels
design decision Needs consideration and design

Comments

@stuartmaxwell
Copy link
Owner

  • date is very important for determining whether a post is published, i.e. a post with a date in the future will not be visible.
  • As of today, the date field is used to construct the URL using the POST_PREFIX settings, e.g. /2024/11/28/my-blog-post
  • As of today, we're not really using the modified_date for anything useful.

The modified_date uses Django's auto_now=True setting in the model to update each time the blog post is updated, but what should we use it for? Some ideas...

  • build the URL off the modified_date instead? I don't know of any other blogging system that does this. It would break the previous URL and would result in unexpected behaviour. Not a good idea. 👎
  • Used in the sitemap? Currently building this out now, so will update soon. ⏰
  • We don't have a template tag for it, but could be useful to show the modified date so that visitors know that it has been updated since original publishing. 👍
  • Although the template tag should have some logic so that if the modified date is within a certain timespan from the published date, it shows nothing. 🤔
  • ...
@stuartmaxwell stuartmaxwell added the design decision Needs consideration and design label Nov 27, 2024
@stuartmaxwell stuartmaxwell self-assigned this Nov 27, 2024
@stuartmaxwell stuartmaxwell moved this to Backlog in DJ Press Nov 28, 2024
@stuartmaxwell stuartmaxwell moved this from Backlog to Ready in DJ Press Nov 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
design decision Needs consideration and design
Projects
Status: Ready
Development

No branches or pull requests

1 participant