In a view I have the following code:
<tbody>
{{for month in months:}}
<tr>
<td>
{{=A(month.maand,_href=URL(r=request,args=
[month.nummer,month.maand]))}}
</td>
</tr>
{{pass}}
</tbody>
Part of the controller reads like:
if request.args:
news=db((db.nieuws.publicatie_datum.month()==request.args[0])&
\
(db.nieuws.doelgroep=='Consument'))\
.select(db.nieuws.ALL,orderby=~db.nieuws.publicatie_datum)
month=request.args.[0].maand
if not news:
response.flash='Selecteer een gearchiveerde maand'
else:
This:
db.nieuws.publicatie_datum.month()==request.args[0]
works, but how do I get the second argument assigned to month? This:
month=request.args.[0][1]
doesn't work. Why does: request.args[0]
retrieve the correct argument?
Kind regards,
Annet.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---