if not editable_order:
patches = order.apply(patches)
+ # we don't need the content or headers for a list; they're text fields
+ # that can potentially contain a lot of data
+ patches = patches.defer('content', 'headers')
+
+ # but we will need to follow the state and submitter relations for
+ # rendering the list template
+ patches = patches.select_related('state', 'submitter')
+
paginator = Paginator(request, patches)
context.update({
if len(parts) == 2:
(body, postscript) = parts
body = body.strip() + "\n"
- postscript = postscript.strip() + "\n"
+ postscript = postscript.rstrip()
else:
postscript = ''
.exclude(msgid = patch.msgid):
body += comment.patch_responses()
- if body:
- body += '\n'
-
if postscript:
- body += '---\n' + postscript.strip() + '\n'
+ body += '---\n' + postscript + '\n'
if patch.content:
body += '\n' + patch.content