Re: Displaying a checkbox/list from database back onto a Django form

2009-06-11 Thread Jashugan
On Jun 10, 10:48 am, NealWalters wrote: > So I stored the list into my bigtable database.  The user goes to page > 2 or 3 of a five page form, then goes back to the first page where the > languages were, and now, I need to show the same languages checked > that he

Re: Displaying a checkbox/list from database back onto a Django form

2009-06-10 Thread NealWalters
Your correct, I'm so close to my issue, I assumed everybody would see it. A user fills out a form to request us to build a website for them. We ask them what languages the would like - and we give them a list, such as English, Spanish, Portuguese, etc... The flag images are there just for looks.

Re: Displaying a checkbox/list from database back onto a Django form

2009-06-10 Thread Jashugan
On Jun 10, 7:59 am, NealWalters wrote: > Can someone advice if this is the optimal solution? It's a hard to help you find a solution when you don't try to state your problem. Just reading your code, it seems if you want to set a single image depending on what

Re: Displaying a checkbox/list from database back onto a Django form

2009-06-10 Thread NealWalters
Here's the last chunk of code. Before I display the template, I have to reset the array with the languages stored in the database. I now default every .Selected variable to False, and this code resets the ones to True based on the database. for dblanguage in session.languages: for

Re: Displaying a checkbox/list from database back onto a Django form

2009-06-10 Thread NealWalters
Can someone advice if this is the optimal solution? I didn't get any feedback yesterday - and must get this working. I've been doing Python a short time, so not always sure the best Pythonic approach... I built an array of objects like this: class Language(db.Model): #this is never stored in

Displaying a checkbox/list from database back onto a Django form

2009-06-08 Thread NealWalters
Template/Form looks like this: English: Spanish: Portuguese: Database model defines column: languages = db.StringListProperty() #stores multiple languages I stored data into Google/BigTable like this: session.languages = self.request.get_all('language') That part