11# Copyright The IETF Trust 2012-2019, All Rights Reserved
22# -*- coding: utf-8 -*-
33
4+
5+ from __future__ import absolute_import , print_function , unicode_literals
6+
47import csv
5- import uuid
68import datetime
79import json
10+ import six
11+ import uuid
812
913from django .http import HttpResponse , HttpResponseForbidden , HttpResponseRedirect , Http404
1014from django .shortcuts import get_object_or_404 , render
1115from django .contrib .auth .decorators import login_required
1216from django .utils .html import strip_tags
1317
18+ import debug # pyflakes:ignore
19+
1420from ietf .community .models import SearchRule , EmailSubscription
1521from ietf .community .forms import SearchRuleTypeForm , SearchRuleForm , AddDocumentsForm , SubscriptionForm
1622from ietf .community .utils import lookup_community_list , can_manage_community_list
@@ -174,7 +180,7 @@ def export_to_csv(request, username=None, acronym=None, group_type=None):
174180
175181 response ['Content-Disposition' ] = 'attachment; filename=%s' % filename
176182
177- writer = csv .writer (response , dialect = csv .excel , delimiter = ',' )
183+ writer = csv .writer (response , dialect = csv .excel , delimiter = str ( ',' ) )
178184
179185 header = [
180186 "Name" ,
@@ -196,7 +202,7 @@ def export_to_csv(request, username=None, acronym=None, group_type=None):
196202 row .append (e .time .strftime ("%Y-%m-%d" ) if e else "" )
197203 row .append (strip_tags (doc .friendly_state ()))
198204 row .append (doc .group .acronym if doc .group else "" )
199- row .append (str (doc .ad ) if doc .ad else "" )
205+ row .append (six . ensure_text (doc .ad ) if doc .ad else "" )
200206 e = doc .latest_event ()
201207 row .append (e .time .strftime ("%Y-%m-%d" ) if e else "" )
202208 writer .writerow ([v .encode ("utf-8" ) for v in row ])
@@ -221,7 +227,7 @@ def feed(request, username=None, acronym=None, group_type=None):
221227
222228 host = request .get_host ()
223229 feed_url = 'https://%s%s' % (host , request .get_full_path ())
224- feed_id = uuid .uuid5 (uuid .NAMESPACE_URL , feed_url )
230+ feed_id = uuid .uuid5 (uuid .NAMESPACE_URL , str ( feed_url ) )
225231 title = '%s RSS Feed' % clist .long_name ()
226232 if significant :
227233 subtitle = 'Significant document changes'
0 commit comments