Skip to content

Commit 204d955

Browse files
committed
Store template name with saved query
When storing user-defined queries we now store the template with the query if the template name is different from 'index'. This allows stored queries for templates different from the default 'index' template.
1 parent 24d9af0 commit 204d955

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

CHANGES.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,10 @@ Features:
142142
keyword. (John Rouillard)
143143
- issue2550757 - internal restructuring to allow admin.py to be tested
144144
more easily. W. Trevor King (wking)/ John Rouillard.
145+
- When storing user-defined queries we now store the template with the
146+
query if the template name is different from 'index'. This allows
147+
stored queries for templates different from the default 'index'
148+
template.
145149

146150
Fixed:
147151

roundup/cgi/actions.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -400,11 +400,12 @@ def getCurrentURL(self, req):
400400
because the leading '?' is not part of the query string.
401401
402402
Implementation note:
403-
But maybe the template should be part of the stored query:
403+
We now store the template with the query if the template name is
404+
different from 'index'
405+
"""
404406
template = self.getFromForm('template')
405-
if template:
407+
if template and template != 'index':
406408
return req.indexargs_url('', {'@template' : template})[1:]
407-
"""
408409
return req.indexargs_url('', {})[1:]
409410

410411
def getFromForm(self, name):

0 commit comments

Comments
 (0)