Opened 4 years ago

Closed 4 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: master
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 Changed 4 years ago by Aymeric Augustin

Triage Stage: UnreviewedAccepted
Version: master

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 :)

comment:2 Changed 4 years ago by Markus Amalthea Magnuson

Owner: changed from nobody to Markus Amalthea Magnuson
Status: newassigned

comment:3 Changed 4 years ago by svisser

It seems one can define it using Python's datetime: http://genshi.edgewall.org/wiki/Documentation/templates.html#id1 .

comment:4 Changed 4 years ago by Markus Amalthea Magnuson

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 Changed 4 years ago by Aymeric Augustin

I don't expect performance to be an issue. Importing a module is very fast once it's in sys.modules.

comment:6 Changed 4 years ago by Markus Amalthea Magnuson

Cool, I'll send in a pull request for this soonish.

comment:7 Changed 4 years ago by Baptiste Mispelon

Cc: bmispelon@… 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:8 Changed 4 years ago by Aymeric Augustin

Triage Stage: AcceptedReady for checkin

As long as it works...

comment:9 Changed 4 years ago by Aymeric Augustin

Resolution: fixed
Status: assignedclosed
Note: See TracTickets for help on using tickets.
Back to Top