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 Aymeric Augustin, 12 years ago

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 by Markus Amalthea Magnuson, 12 years ago

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

comment:3 by svisser, 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 Markus Amalthea Magnuson, 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 Aymeric Augustin, 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:6 by Markus Amalthea Magnuson, 12 years ago

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

comment:7 by Baptiste Mispelon, 12 years ago

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 by Aymeric Augustin, 12 years ago

Triage Stage: AcceptedReady for checkin

As long as it works...

comment:9 by Aymeric Augustin, 12 years ago

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