Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Don't hide announcements after the last hidden one.

Previously, the "hide all announcements before N" cookie was setting N to "the
time the user clicked hide".  Now it's setting N to "the creation date of the
announcement the user is hiding".

  • Loading branch information...
commit 6039284a7efdde08bbe5be4a420998e1ae34b65e 1 parent efcdb81
@sjl sjl authored
Showing with 5 additions and 2 deletions.
  1. +5 −2 apps/auth/templatetags/
7 apps/auth/templatetags/
@@ -33,8 +33,11 @@ def announcement(context):
except (ValueError, TypeError, AttributeError):
hidden_date = None
+ ann = Announcement.last(hidden_date)
+ date = ann.created.strftime(Announcement.cookie_date_format) if ann else None
return {
- 'obj': Announcement.last(hidden_date),
+ 'obj': ann,
'cookie_name': Announcement.hide_cookie_name,
- 'date':
+ 'date': date,
Please sign in to comment.
Something went wrong with that request. Please try again.