Code

#20457 closed Cleanup/optimization (fixed)

Copyright footer on Trac says "2012" instead of "2013" as the rest of the website

Reported by: giuliettamasina Owned by: giuliettamasina
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

Attachments (0)

Change History (9)

comment:1 Changed 14 months ago by aaugustin

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Accepted
  • Version set to 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 14 months ago by giuliettamasina

  • Owner changed from nobody to giuliettamasina
  • Status changed from new to assigned

comment:3 Changed 14 months 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 14 months ago by giuliettamasina

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 14 months ago by aaugustin

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

comment:6 Changed 14 months ago by giuliettamasina

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

comment:7 Changed 14 months ago by bmispelon

  • 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 14 months ago by aaugustin

  • Triage Stage changed from Accepted to Ready for checkin

As long as it works...

comment:9 Changed 14 months ago by aaugustin

  • Resolution set to fixed
  • Status changed from assigned to closed

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.