diff options
author | Alexandru DAMIAN <alexandru.damian@intel.com> | 2015-05-14 14:40:10 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-05-29 11:59:43 +0100 |
commit | a5236be47fd62d41eaea2d4b4f1a394de0aac4a9 (patch) | |
tree | ed78623e18ee07ccd270bda36e51e598b9707469 /bitbake/lib/toaster/toastergui | |
parent | 5da543c7b5cd565eed285a5015b1cafdc71ddb83 (diff) | |
download | poky-a5236be47fd62d41eaea2d4b4f1a394de0aac4a9.tar.gz |
bitbake: toaster: enable server-side sessions for all usages
In an effort to fix client-side session storage using
cookies, we enable server-side session support for all pages.
(Bitbake rev: ba10b6f89767c0dad8a2b064f42a84956764e9da)
Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/toaster/toastergui')
-rwxr-xr-x | bitbake/lib/toaster/toastergui/views.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/bitbake/lib/toaster/toastergui/views.py b/bitbake/lib/toaster/toastergui/views.py index 9217d8a100..c16fc2219f 100755 --- a/bitbake/lib/toaster/toastergui/views.py +++ b/bitbake/lib/toaster/toastergui/views.py | |||
@@ -266,8 +266,10 @@ def _get_queryset(model, queryset, filter_string, search_term, ordering_string, | |||
266 | # if the value is given explicitly as a GET parameter it will be the first selected, | 266 | # if the value is given explicitly as a GET parameter it will be the first selected, |
267 | # otherwise the cookie value will be used. | 267 | # otherwise the cookie value will be used. |
268 | def _get_parameters_values(request, default_count, default_order): | 268 | def _get_parameters_values(request, default_count, default_order): |
269 | pagesize = request.GET.get('count', request.COOKIES.get('count', default_count)) | 269 | from django.core.urlresolvers import resolve |
270 | orderby = request.GET.get('orderby', request.COOKIES.get('orderby', default_order)) | 270 | current_url = resolve(request.path_info).url_name |
271 | pagesize = request.GET.get('count', request.session.get('%s_count' % current_url, default_count)) | ||
272 | orderby = request.GET.get('orderby', request.session.get('%s_orderby' % current_url, default_order)) | ||
271 | return (pagesize, orderby) | 273 | return (pagesize, orderby) |
272 | 274 | ||
273 | 275 | ||