I want to hide some data after the 10th day of every month. How can I implement this check?
I dont want to make any function in the views . And there should be something publicly used over the web site in Templates .
I want to hide some data after the 10th day of every month. How can I implement this check?
I dont want to make any function in the views . And there should be something publicly used over the web site in Templates .
You can do this in template
{% if your_date.day < 10 %}
{# show the data #}
{% else %}
{# hide data #}
{% endif %}
{% if date.day <= 10 %}
//show data
{% else %}
//no data
{% endif %}
This is literally the exact same question as this one: get particular date in django template Django
I answered completely in that one.