# HG changeset patch # User rbernard # Date 1260528490 -3600 # Node ID b32aa76ee411b693df1565e5c27402f35e194a72 # Parent bd8a4ffc7dad0e02a52470dcd66d8aa7a0bf7b2d# Parent 2f46b4753efda5cbd7b8c6ceed5c8bb7862c0466 merge diff -r bd8a4ffc7dad -r b32aa76ee411 .hgignore --- a/.hgignore Fri Dec 11 11:17:01 2009 +0100 +++ b/.hgignore Fri Dec 11 11:48:10 2009 +0100 @@ -27,4 +27,6 @@ syntax: regexp ^bin$ syntax: regexp -^recreate$ \ No newline at end of file +^recreate$ +syntax: regexp +^\.pydevproject$ \ No newline at end of file diff -r bd8a4ffc7dad -r b32aa76ee411 .pydevproject --- a/.pydevproject Fri Dec 11 11:17:01 2009 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,10 +0,0 @@ - - - - -python 2.6 -Default - -/comt2/src - - diff -r bd8a4ffc7dad -r b32aa76ee411 src/cm/converters/__init__.py --- a/src/cm/converters/__init__.py Fri Dec 11 11:17:01 2009 +0100 +++ b/src/cm/converters/__init__.py Fri Dec 11 11:48:10 2009 +0100 @@ -40,7 +40,7 @@ 'text/english', 'text/enriched' ]: - converted_input = input + converted_input = to_unicode(input) ############################## # anything looks like code: put them into markdown citation diff -r bd8a4ffc7dad -r b32aa76ee411 src/cm/notifications.py --- a/src/cm/notifications.py Fri Dec 11 11:17:01 2009 +0100 +++ b/src/cm/notifications.py Fri Dec 11 11:48:10 2009 +0100 @@ -21,7 +21,7 @@ activity = kwargs['instance'] if activity.type in Activity.VIEWABLE_ACTIVITIES.get('view_users'): # user activity: only viewed by managers - notifications = Notification.objects.filter(text=None) + notifications = Notification.objects.filter(text=None, active=True) for notification in notifications: if notification.user: from cm.security import user_has_perm # import here! @@ -29,7 +29,7 @@ send_notification(activity, notification) allready_notified.add(notification.user) elif activity.type in Activity.VIEWABLE_ACTIVITIES.get('view_comments'): - notifications = Notification.objects.filter(Q(text=activity.text) | Q(text=None)) + notifications = Notification.objects.filter(Q(text=activity.text) | Q(text=None), active=True) for notification in notifications: viewable = get_viewable_comments(FakeRequest(notification.user), Comment.objects.filter(id__in = [activity.comment.id]), @@ -41,7 +41,7 @@ send_notification(activity, notification) allready_notified.add(notification.user) elif activity.type in Activity.VIEWABLE_ACTIVITIES.get('view_texts'): - notifications = Notification.objects.filter(Q(text=activity.text) | Q(text=None)) + notifications = Notification.objects.filter(Q(text=activity.text) | Q(text=None), active=True) for notification in notifications: if notification.user: from cm.security import user_has_perm # import here! diff -r bd8a4ffc7dad -r b32aa76ee411 src/cm/views/export.py --- a/src/cm/views/export.py Fri Dec 11 11:17:01 2009 +0100 +++ b/src/cm/views/export.py Fri Dec 11 11:48:10 2009 +0100 @@ -102,7 +102,9 @@ file_title = title + '.' + extension from email.header import Header encoded_name = str(Header(file_title.encode('utf8'), charset='utf8', maxlinelen=500)) - response['Content-Disposition'] = u'attachment; filename=%s' % encoded_name + # TODO: find a way to include long (more than 76 chars) into header + encoded_name = encoded_name.replace('\n','') + response['Content-Disposition'] = 'attachment; filename=%s' % encoded_name response.write(content) return response