Opened 12 years ago
Closed 12 years ago
#20457 closed Cleanup/optimization (fixed)
Copyright footer on Trac says "2012" instead of "2013" as the rest of the website
Reported by: | Markus Amalthea Magnuson | Owned by: | Markus Amalthea Magnuson |
---|---|---|---|
Component: | *.djangoproject.com | Version: | dev |
Severity: | Normal | Keywords: | |
Cc: | bmispelon@… | Triage Stage: | Ready for checkin |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | yes |
Description
The copyright info in the footer of Trac says "© 2005-2012 Django Software Foundation" instead of having 2013 as the upper year, as in the footer on djangoproject.com
Change History (9)
comment:1 by , 12 years ago
Triage Stage: | Unreviewed → Accepted |
---|---|
Version: | → master |
comment:2 by , 12 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
comment:3 by , 12 years ago
It seems one can define it using Python's datetime
: http://genshi.edgewall.org/wiki/Documentation/templates.html#id1 .
comment:4 by , 12 years ago
Hmm, maybe a bit heavy to import a whole module just to print a simple year string? Or maybe not; I'm wondering if it could be performance measured somehow.
I will look into it and propose some sort of change, thanks for the info svisser :)
comment:5 by , 12 years ago
I don't expect performance to be an issue. Importing a module is very fast once it's in sys.modules
.
comment:7 by , 12 years ago
Cc: | added |
---|---|
Has patch: | set |
I was playing around a bit and I found that you have access to datetime.date
in the site.html
context.
I couldn't find this documented anywhere so I'm not sure how reliable it is, but it worked on my local trac instance.
This makes the change rather trivial: https://github.com/django/code.djangoproject.com/pull/6/files.
comment:9 by , 12 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Fixed in a84118fd335736b358acf4673bccd38d52e00a5e.
It's defined here: https://github.com/django/code.djangoproject.com/blob/master/trac-env/templates/site.html#L37
If somone knows the equivalent of
{% now 'Y' %}
in Genshi, that'd help :)