fix: fixed year rendering

This commit is contained in:
Rushil Umaretiya 2022-11-07 13:54:38 -05:00
parent 36841722d3
commit c50edc32dc
No known key found for this signature in database
GPG Key ID: 4E8FAF9C926AF959
4 changed files with 5 additions and 2 deletions

1
global/settings/.gitignore vendored Normal file
View File

@ -0,0 +1 @@
secret.py

View File

@ -138,5 +138,6 @@ from datetime import date
from dateutil.relativedelta import relativedelta
CURRENT_YEAR = (date.today() - relativedelta(months=7)).year
END_YEAR = CURRENT_YEAR + 1
from .secret import *

View File

@ -10,7 +10,7 @@
{% block body %}
<div id="hero">
<h1>global studies<br><span>TJHSST {% settings_value "CURRENT_YEAR" %} - 2023</span></h1>
<h1>global studies<br><span>TJHSST {% settings_value "CURRENT_YEAR" %} - {% settings_value "END_YEAR" %}</span></h1>
</div>
{% include "nav.html" %}

View File

@ -1,6 +1,7 @@
{% load static %}
{% load settings %}
<nav class="navbar navbar-expand-lg navbar-light bg-light">
<a class="navbar-brand" href="{% url 'base:index' %}">Global Studies 2022</a>
<a class="navbar-brand" href="{% url 'base:index' %}">Global Studies {% settings_value "CURRENT_YEAR" %} - {% settings_value "END_YEAR" %}</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNav" data-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>