def event_detail(request, year=None, month=None, day=None, event_slug=None):
    """
    Shows a specific event.
    """
    try:
        if year:
            year = int(year)
        if month:
            month = int(month)
        if day:
            day = int(day)
    except __HOLE__:
        raise Http404
    
    events = Event.objects.filter(start__year=year, start__month=month, start__day=day)
    try:
        event = events.get(slug=event_slug)
    except Event.DoesNotExist:
        raise Http404
    
#    if calendar_slug:
#        return HttpResponsePermanentRedirect(event.get_absolute_url())
    
    page = {
        'event': event
    }
    
    return render_to_response('events/event_detail.html', page, context_instance=RequestContext(request))
dataset/ETHPy150Open albatrossandco/brubeck_cms/brubeck/events/views.py/event_detail