On 10/9/07, Greg <[EMAIL PROTECTED]> wrote:
> I want to create a list that can be updated from within a part of a
> view and retreived from another part of a view. Here is my view.py
To access a global variable you need to use the 'global' keyword.
A better option, however, is to store the resu
Kenneth,
I've tried that. It will not work because everytime the view gets
accessed then mysearchlist gets cleared. Once mysearchlist is created
from within the post. I want the values to stay the same no matter
how many times the GET gets accessed.
On Oct 9, 10:02 pm, Kenneth Gonsalves <[EMAI
On 10-Oct-07, at 8:27 AM, Greg wrote:
> def searchresult(request):
mysearchlist = []
> if request.method == 'POST':
> mysearchlist = [1,2,3,4,5]
> if request.method == 'GET':
> assert False, mysearchlist
--
regards
kg
http://lawgon.livejournal.com
http://nrcfo
Hello,
I want to create a list that can be updated from within a part of a
view and retreived from another part of a view. Here is my view.py
file
from django.shortcuts import render_to_response, get_object_or_404
mysearchlist = []
def searchresult(request):
if request.method == 'POST':
4 matches
Mail list logo