I defined a table newsmonth: db.define_table('nieuwsmonth', db.Field ('number',type='integer',length=2,default='',notnull=True), db.Field('month',length=14,default='',notnull=True,unique=True), db.Field('publish',type='boolean'), migrate=False)
... which I use to display archived news items per month. Number is the number of the month e.g January 1 month is a string, for January it reads like: January 2009. publish defaults to false and is set to true on the 1st of the next month. In the view I have a list with links: Oktober 2009 September 2009 August 2009 When the visitor clicks September 2009, the news table is queried, in the where clause I have: db.news.publication_date.month()==request.args[0] ... request.args[0] contains newsmonth.number month is set to request.args[1], i.e September 2009, and returned to the view, which I posted above. For some reason order matters here. 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 web2py@googlegroups.com To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/web2py?hl=en -~----------~----~----~----~------~----~------~--~---