Opened 4 years ago

Closed 4 years ago

#17317 closed Uncategorized (invalid)

lists stored in session becomes not changed (by pop() or del) in next request

Reported by: oddghost@… Owned by: nobody
Component: Generic views Version: 1.2
Severity: Normal Keywords: pop session
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no


i stored small list in session

	v = Tests.objects.values_list('number', flat=True).filter(test=test,ticket=nomera).order_by('number')
	request.session['tests-cards'] = list(v)

and want to obtain one element per request.

this don`t write session:

def get_next(request):

and this so:

def get_next(request):
	del request.session['tests-cards'][0]

this works:

def get_next(request):

bug or not?

Change History (1)

comment:1 in reply to: ↑ description Changed 4 years ago by ramiro

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Resolution set to invalid
  • Status changed from new to closed

Replying to oddghost@…:

bug or not?

No, please read documentation first.

Note: See TracTickets for help on using tickets.
Back to Top