All,
   How do I view SQLForm.grid View, Edit or Delete forms without using
auth? I have implemented my own custom authorization mechanism which
does not use web2py auth in any way. Now the problem is in SQLForm
grid that is serialized in my view It say "not authorised" when I
click on View button. How do I override the default auth mechanism for
the SQLForm grid.

--------code-----------
form = SQLFORM.grid( query=query, fields=fields, headers=headers,
orderby=default_sort_order,
                         create=False, deletable=False,
editable=False,  csv=False, maxtextlength=64, paginate=20 )


Please suggest,
Thanks Rahul D (www.flockbird.com - web2py powered)

------------------------------------------------------------------------------


On Nov 22, 6:54 pm, Anthony <abasta...@gmail.com> wrote:
> Massimo, the issue is that the grid doesn't provide an easy way to include
> virtual fields. You can do it by using the 'links' argument with a
> dictionary for each virtual field (though that's a bit cumbersome), but
> then you cannot use the 'fields' argument to select only a subset of fields
> or the virtual fields references will fail. A workaround is to set the
> readable attribute of fields you don't want to include to False, but that's
> even more cumbersome and results in the selecting unnecessary fields.
>
> Side note: I wonder if 'links' should be changed to a more generic name,
> such as 'extra', since it can be used to add extra columns of any type, not
> just links.
>
> Anthony
>
>
>
>
>
>
>
> On Monday, November 21, 2011 9:58:18 PM UTC-5, Massimo Di Pierro wrote:
>
> > I am bit lost in this thread. Can you summarize the issue?
>
> > On Nov 21, 7:55 pm, villas <vill...@gmail.com> wrote:
> > > Yes,  that's a good idea and it does seem to work.
> > > On the downside, I have a huge number of fields and I think the query
> > will
> > > still fetch them all.  Also I have to make a very long list of
> > > field.readable = False.
> > > So,  if a better solution appears,  I would be very grateful.
> > > However,  in any case,  I really do appreciate your assistance.
> > > Thank you and best regards,  David

Reply via email to