Bläddra i källkod

Move cookies in render()

Cqoicebordel 10 år sedan
förälder
incheckning
816a2c5cbe
1 ändrade filer med 2 tillägg och 6 borttagningar
  1. 2
    6
      searx/webapp.py

+ 2
- 6
searx/webapp.py Visa fil

277
 
277
 
278
     kwargs['template_name'] = template_name
278
     kwargs['template_name'] = template_name
279
 
279
 
280
+    kwargs['cookies'] = request.cookies
281
+
280
     return render_template(
282
     return render_template(
281
         '{}/{}'.format(kwargs['theme'], template_name), **kwargs)
283
         '{}/{}'.format(kwargs['theme'], template_name), **kwargs)
282
 
284
 
292
     if not request.args and not request.form:
294
     if not request.args and not request.form:
293
         return render(
295
         return render(
294
             'index.html',
296
             'index.html',
295
-            cookies=request.cookies,
296
         )
297
         )
297
 
298
 
298
     try:
299
     try:
300
     except:
301
     except:
301
         return render(
302
         return render(
302
             'index.html',
303
             'index.html',
303
-            cookies=request.cookies,
304
         )
304
         )
305
 
305
 
306
     search.results, search.suggestions,\
306
     search.results, search.suggestions,\
389
         answers=search.answers,
389
         answers=search.answers,
390
         infoboxes=search.infoboxes,
390
         infoboxes=search.infoboxes,
391
         theme=get_current_theme_name(),
391
         theme=get_current_theme_name(),
392
-        cookies=request.cookies,
393
         favicons=global_favicons[themes.index(get_current_theme_name())]
392
         favicons=global_favicons[themes.index(get_current_theme_name())]
394
     )
393
     )
395
 
394
 
399
     """Render about page"""
398
     """Render about page"""
400
     return render(
399
     return render(
401
         'about.html',
400
         'about.html',
402
-        cookies=request.cookies,
403
     )
401
     )
404
 
402
 
405
 
403
 
561
                   autocomplete_backends=autocomplete_backends,
559
                   autocomplete_backends=autocomplete_backends,
562
                   shortcuts={y: x for x, y in engine_shortcuts.items()},
560
                   shortcuts={y: x for x, y in engine_shortcuts.items()},
563
                   themes=themes,
561
                   themes=themes,
564
-                  cookies=request.cookies,
565
                   theme=get_current_theme_name())
562
                   theme=get_current_theme_name())
566
 
563
 
567
 
564
 
619
     return render(
616
     return render(
620
         'stats.html',
617
         'stats.html',
621
         stats=stats,
618
         stats=stats,
622
-        cookies=request.cookies,
623
     )
619
     )
624
 
620
 
625
 
621