Permalink
Browse files

Fixing views to use new hash rather than ID

  • Loading branch information...
1 parent c44204a commit 8b0a26495894d38b61804738228d48ee492fb0cf @andrewhayward committed May 22, 2012
Showing with 6 additions and 1 deletion.
  1. +6 −1 make_mozilla/events/views.py
View
7 make_mozilla/events/views.py
@@ -108,8 +108,13 @@ def _add_email_to_bsd(user, privacy_form):
tasks.register_email_address_as_constituent.delay(user.email, '111')
-def details(request, event_id):
+def from_id(request, event_id):
event = get_object_or_404(models.Event, pk=event_id)
+ return http.HttpResponseRedirect(reverse('event', kwargs={'event_hash': event.hash}))
+
+
+def details(request, event_hash):
+ event = get_object_or_404(models.Event, url_hash=event_hash)
return jingo.render(request, 'events/detail.html', {'event': event})

0 comments on commit 8b0a264

Please sign in to comment.