I will edit the code to make it work as in the slice.

On Monday, 17 December 2012 23:38:11 UTC-6, software.ted wrote:
>
> Hi Massimo!
>
> It works thanks, the slice I am following is very useful and popular that 
> error must be edited.
>
> Teddy L.
>
>
> On Mon, Dec 17, 2012 at 5:09 PM, Massimo Di Pierro 
> <[email protected]<javascript:>
> > wrote:
>
>> Replace
>>
>>  fields = 
>> (db.file_transaction.file_id,**db.file_transaction.source_**office_id, 
>> \
>>                 db.file_transaction.**destination_office_id, 
>> db.file_transaction.**transaction_date_time)
>>
>> with
>>
>>  fields = 
>> [db.file_transaction.file_id,**db.file_transaction.source_**office_id, 
>> \
>>                 db.file_transaction.**destination_office_id, 
>> db.file_transaction.**transaction_date_time]
>>
>> On Monday, 17 December 2012 08:58:36 UTC-6, software.ted wrote:
>>>
>>> I am trying to set the fields to display in my grid...I am following the 
>>> slice at 
>>> http://www.web2pyslices.**com/slice/show/1471/**sqlformgrid<http://www.web2pyslices.com/slice/show/1471/sqlformgrid>,
>>>  however, I am having an error with fields...I am using it as follows and 
>>> I getting an error as below:
>>>
>>> links = [lambda row: A('View Post',_href=URL("**
>>> administration","file_details"**,args=[row.file_transaction.**
>>> file_id]))]
>>>     fields = (db.file_transaction.file_id,**db.file_transaction.source_*
>>> *office_id, \
>>>                 db.file_transaction.**destination_office_id, 
>>> db.file_transaction.**transaction_date_time)
>>>     query = ((db.file_subject_issue.**circulation_status==True) & 
>>> (db.file_transaction.file_**subject_issue_id == db.file_subject_issue.id
>>> ))
>>>     form = SQLFORM.grid(query,searchable=**True,links=links, 
>>> fields=fields, deletable=False, \
>>>                 details=False, editable=False, \
>>>                 selectable=False,csv=False , paginate=20, 
>>> user_signature=False)
>>>
>>> Error:
>>>
>>> <type 'exceptions.AttributeError'> 'tuple' object has no attribute 
>>> 'append'
>>>
>>>
>>> 2.
>>> 3.
>>> 4.
>>> 5.
>>> 6.
>>> 7.
>>> 8.
>>> 9.
>>> 10.
>>> 11.
>>> 12.
>>>
>>> Traceback (most recent call last):
>>>   File "/home/www-data/web2py/gluon/**restricted.py", line 212, in 
>>> restricted
>>>
>>>
>>>     exec ccode in environment
>>>   File 
>>> "/home/www-data/web2py/**applications/intranet/**controllers/administration.py"
>>>  
>>> <https://192.168.0.251/admin/default/edit/intranet/controllers/administration.py>**,
>>>  line 175, in <module>
>>>
>>>
>>>   File "/home/www-data/web2py/gluon/**globals.py", line 188, in <lambda>
>>>
>>>
>>>     self._caller = lambda f: f()
>>>
>>>
>>>   File 
>>> "/home/www-data/web2py/**applications/intranet/**controllers/administration.py"
>>>  
>>> <https://192.168.0.251/admin/default/edit/intranet/controllers/administration.py>**,
>>>  line 70, in file_track
>>>
>>>
>>>     selectable=False,csv=False , paginate=20, user_signature=False)
>>>
>>>
>>>   File "/home/www-data/web2py/gluon/**sqlhtml.py", line 1799, in grid
>>>
>>>
>>>     fields.append(field_id)
>>>
>>> AttributeError: 'tuple' object has no attribute 'append'
>>>
>>>
>>> -- Teddy L
>>>  
>>  -- 
>>  
>>  
>>  
>>
>
>
>
> -- 
>
> .......................................................................................
> Teddy Lubasi Nyambe
> Opensource Zambia
> Lusaka, ZAMBIA
>
> Cell: +260 97 7760473
> website: http://www.opensource.org.zm
>
> ~/
> Human Knowledge belongs to the world! - AntiTrust
>
> Man is a tool-using animal. Without tools he is nothing, with tools he is 
> all - Thomas Carlyle 1795-1881
>
> /~
>  

-- 



Reply via email to