Pardon me for my english.

What about some kind of page controller's arguments processor?
For example something like that:

from myproj.models import ArticleModel

class Home:

  @process_arguments (Error404OnFail (ArticleModel), UseDefaultOnFail
(int, 0), str, int)
  def GET (s, article, page_number, foo, bar):
    ...

ArticleModel constructor:
def __init__ (s, row_id=None)

Doing so we initially have in GET method of Home class instance:
article = ArticleModel object that keeps row that was finded by it's
id that was specifed in url
page_number = some integer that was specifed in url or 0 if
transformation of url segment to int raised exception
and so on

Sorry if this is a lame idea, i'm newbie in python programming


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web.py" 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/webpy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to