Skip to content

Commit bbf17ea

Browse files
WEB: Add new footer to web (#48557)
1 parent 5d7b54b commit bbf17ea

File tree

3 files changed

+11
-1
lines changed

3 files changed

+11
-1
lines changed

web/pandas/_templates/layout.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@
9191
</li>
9292
</ul>
9393
<p>
94-
pandas is a fiscally sponsored project of <a href="https://numfocus.org">NumFOCUS.</a>
94+
&copy; {{ current_year }} pandas via <a href="https://numfocus.org">NumFOCUS, Inc.</a> Hosted by <a href="https://www.ovhcloud.com">OVH Cloud</a>.
9595
</p>
9696
</footer>
9797

web/pandas/config.yml

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ main:
77
- try.md # the binder page will be added later
88
github_repo_url: pandas-dev/pandas
99
context_preprocessors:
10+
- pandas_web.Preprocessors.current_year
1011
- pandas_web.Preprocessors.navbar_add_info
1112
- pandas_web.Preprocessors.blog_add_posts
1213
- pandas_web.Preprocessors.maintainers_add_info

web/pandas_web.py

+9
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,15 @@ class Preprocessors:
5454
anything else needed just be added with context preprocessors.
5555
"""
5656

57+
@staticmethod
58+
def current_year(context):
59+
"""
60+
Add the current year to the context, so it can be used for the copyright
61+
note, or other places where it is needed.
62+
"""
63+
context["current_year"] = datetime.datetime.now().year
64+
return context
65+
5766
@staticmethod
5867
def navbar_add_info(context):
5968
"""

0 commit comments

Comments
 (0)