It's generally best to keep business logic out of the view and limit the
view to just displaying data, so I would say the former.
Anthony
On Sunday, September 1, 2013 11:09:27 PM UTC-7, אבי אברמוביץ wrote:
>
> Alright, thanks.
> What is a better practice, to create the query on the controller, pass the
> list var to the view and there just display for example 30 times, or for
> example create a 1, 30 range loop on the view, and create the query
> directly there?
>
> On Sunday, September 1, 2013 12:25:32 AM UTC+3, אבי אברמוביץ wrote:
>>
>> Hi,
>> I do this query:
>> items = db.executesql('SELECT * FROM project;')
>> For the field below, which is a field in the db.project:
>> Field('company_name', 'reference company', notnull=True).
>> On the view, "{{=item[3]}}" renders only '1'.(instead of the company
>> name).
>> What should I do?
>> Thanks.
>>
>
--
---
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/groups/opt_out.