On 25 January 2012 12:04, Web2Py Freak <[email protected]> wrote:
> i Fixed a bug its now
>
> instruments = db().select(db.Instruments.ALL)
> myins = []
> for ins in instruments:
> myins.append((T(ins.Instrument_name), False,
> URL('default','Instruments',args=ins.Instrument_name),)
> response.menu = [
> (T('Home'), False, URL('default','index'), [])
> (T('Instruments'), False, URL('default','Instruments'), [
> myins
> ])
> ]
>
> but still the same problem
>
Why do you have the comma after 'ins.Instrument_name)'?
This works so if your loop can produce a list with this type of format it
should work in your case also:
l = [ (T('Toets'), False, URL(request.application, 'default', 'articles')),
(T('Browse journals'), False, URL(request.application,
'default', 'journals')),
(T('Browse authors'), False, URL(request.application,
'default', 'browse_authors_linked_to_articles')),
(T('Check Titles'), False, URL(request.application,
'default', 'kies_profiel_tabel'))]
response.menu += l
Regards
Johann
--
Because experiencing your loyal love is better than life itself,
my lips will praise you. (Psalm 63:3)