Don't use backslashes but simply braces like so:

    end_date = (filter_form.cleaned_data['end_date'] or
                datetime.datetime.now())