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
For the "to date" on projects, we will often leave this field empty where a project is on-going. Could we make it so that the default value is shown as the word 'current' where no data is supplied? Also, could we make it so that an empty value is automatically assumed to be the the current date (for ordering purposes)?
The text was updated successfully, but these errors were encountered:
I believe the ordering is already correct and this issue is largely subsumed by the discussion in #162.
Anywhere in a template you can use the built in filter 'default_if_none' to display a value thus: {% obj.to_date|default_if_none:"present" %}
You can chain filters so to format the date you can add the usual date presentation e.g. {% obj.to_date|default_if_none:"present"|date:"b Y"|title %}
In words, this says "present obj.to_date as 'present' if it is none, as a date formatted as 'b Y', formatted as a title"
For the "to date" on projects, we will often leave this field empty where a project is on-going. Could we make it so that the default value is shown as the word 'current' where no data is supplied? Also, could we make it so that an empty value is automatically assumed to be the the current date (for ordering purposes)?
The text was updated successfully, but these errors were encountered: