You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is naming inconsistency in the fields related to publication date and availability:
- Product.available_on + Product.is_published
- Page.available_on + Page.is_visible
- Collection.published_date + Collection.is_published (will be merged soon, #3369)
Also fields is_visible/is_published are problematic since they can be set to True but if the future publication date is set, an item won't be available publicly.
What I would propose to do about it:
introduce publication_date = models.DateTimeField() field in all of the above-mentioned models (currently we have DateField but I think some may want to specify exact time as well)
rename is_published/is_visible fields to is_draft - I think that what those fields do is telling if as an admin I've already finished editing an object or I still have something to add, but I'd like to hear some feedback about this one. Let's consistently use is_published for this kind of fields.
The text was updated successfully, but these errors were encountered:
We could have isPublished in the API and also as a helper method in the model, but it should be a property taking into account publication_date and is_draft underneath.
There is naming inconsistency in the fields related to publication date and availability:
-
Product.available_on
+Product.is_published
-
Page.available_on
+Page.is_visible
-
Collection.published_date
+Collection.is_published
(will be merged soon, #3369)Also fields
is_visible
/is_published
are problematic since they can be set toTrue
but if the future publication date is set, an item won't be available publicly.What I would propose to do about it:
publication_date = models.DateTimeField()
field in all of the above-mentioned models (currently we haveDateField
but I think some may want to specify exact time as well)renameLet's consistently useis_published
/is_visible
fields tois_draft
- I think that what those fields do is telling if as an admin I've already finished editing an object or I still have something to add, but I'd like to hear some feedback about this one.is_published
for this kind of fields.The text was updated successfully, but these errors were encountered: