Thanks, Michael! I think I've figured it out somewhat. The answer I was 
looking for was vars. Being able to reference vars in different controllers 
is very powerful. By referencing the var I can select the record from the 
table I was referencing and render it in the view. A simple concept for 
most I would imagine, but I learn something new everyday with web2py. 
Thanks again!!

On Monday, October 13, 2014 3:21:54 PM UTC-4, Michael Beller wrote:
>
> Massimo created a series of videos for a course he taught that included 
> some really helpful tutorials and examples.  In one of the videos, he built 
> a complete app for Surveys - including the ability to build a list of 
> questions, poll for answers, and other features.  I think you'll find the 
> answers and some ideas to help you with your app in the video.
>
> I started to build an index of the topics covered by the videos to help me 
> go back and review. Unfortunately, I only thought of doing this after I 
> watched all 5 videos but I've started to update the index every time I go 
> back to find a topic.  The index is only partially complete but does have 
> an entry for the Survey app along with the time in the video so you can go 
> directly to the spot with the Survey tutorial.
>
> Here's the index:
>
>
> https://docs.google.com/spreadsheet/ccc?key=0AskUxMwC3JzwdDNYRGtSZ3NTSTVEQ1g1QnBfR0FMa1E
>
> Please feel free to update the index if you watch more of the videos.
>
> On Monday, October 13, 2014 12:20:33 PM UTC-4, LoveWeb2py wrote:
>>
>> I currently have this setup in my view:
>>
>>                                {{for question in all_questions:}}
>>                     {{if question['difficulty']=='Hard':}}
>>                     <li class="padded"><a 
>> href="{{=question['id']}}">{{=question['title']}}</a></li>
>>                     {{pass}}
>>                     {{else:}}
>>                     {{pass}}
>>
>> I want to be able to click on the link and load the question related to 
>> the database id in another div. To help with my question from earlier... 
>> what is the best way to achieve this?
>>
>> On Monday, October 13, 2014 9:58:57 AM UTC-4, LoveWeb2py wrote:
>>>
>>> Hello,
>>>
>>> I'm trying to create an application to help my teacher ask students 
>>> questions but I'm not quite sure how to structure the MVC. 
>>>
>>> Let's say I have 10 entries in the SQL database and my sql database 
>>> looks something like this:
>>>
>>> db.define_table('teacher_questions',
>>>                 Field('id','integer'),
>>>                 Field('title','string'),
>>>                 Field('question','string'),
>>>                 Field('answer','string'),
>>>                 Field('hint','string'),
>>>                 Field('comments','string'),
>>>                 migrate=False)
>>>
>>> I could do a for loop to return all of the questions, but how could I 
>>> make a link which points to specific questions. I also want the teacher to 
>>> be able to add a new question and the list of questions will update 
>>> automatically. In the page that pops up I want to have an input field which 
>>> will take the students question and compare it against the answer in the 
>>> database. If it is right it will use bootstrap success and say correct. If 
>>> it is wrong it will use the bootstrap error. Is there an app that is 
>>> already created or a model of a web page I could look at for guidance? I've 
>>> been struggling with this concept for about a week now which is why I'm 
>>> reaching out to the experts
>>>
>>> Any help is greatly appreciated...
>>>
>>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to