|
@@ -123,6 +123,8 @@ def render(template_name, **kwargs):
|
123
|
123
|
if not 'autocomplete' in kwargs:
|
124
|
124
|
kwargs['autocomplete'] = autocomplete
|
125
|
125
|
|
|
126
|
+ kwargs['method'] = request.cookies.get('method', 'POST')
|
|
127
|
+
|
126
|
128
|
return render_template(template_name, **kwargs)
|
127
|
129
|
|
128
|
130
|
|
|
@@ -295,6 +297,7 @@ def preferences():
|
295
|
297
|
selected_categories = []
|
296
|
298
|
locale = None
|
297
|
299
|
autocomplete = ''
|
|
300
|
+ method = 'POST'
|
298
|
301
|
for pd_name, pd in request.form.items():
|
299
|
302
|
if pd_name.startswith('category_'):
|
300
|
303
|
category = pd_name[9:]
|
|
@@ -309,6 +312,8 @@ def preferences():
|
309
|
312
|
pd in (x[0] for
|
310
|
313
|
x in language_codes)):
|
311
|
314
|
lang = pd
|
|
315
|
+ elif pd_name == 'method':
|
|
316
|
+ method = pd
|
312
|
317
|
elif pd_name.startswith('engine_'):
|
313
|
318
|
engine_name = pd_name.replace('engine_', '', 1)
|
314
|
319
|
if engine_name in engines:
|
|
@@ -348,6 +353,8 @@ def preferences():
|
348
|
353
|
max_age=cookie_max_age
|
349
|
354
|
)
|
350
|
355
|
|
|
356
|
+ resp.set_cookie('method', method, max_age=cookie_max_age)
|
|
357
|
+
|
351
|
358
|
return resp
|
352
|
359
|
return render('preferences.html',
|
353
|
360
|
locales=settings['locales'],
|