Mike,
> ${paginate.Page(c.records, items_per_page=config["items_per_page"])}
Well, what if you need to use it hundred of times in templates, what
if it requires several config/request/environ values to be passed.
For real world example of mine.
There's a function to render static content URLs with $
{h.static_url('img.png')}.
This function depends on
config['debug']
config['pylons.paths']['static_files']
environ['HTTP_HOST']
The function is used pretty widely across templates and controllers.
Will the 1.1 version of Pylons force me to pass all those globals as
parameters of static_url?
That is a huge amount of repeating code just to make things look
obvious. Even if I use "c" instead.
I believe there are always should be at least two kinds of well known
globals:
1. Application instance with application-wide globals (app, config,
app_globals).
2. Something with HTTP request (thread) lifecycle (request/response/
c/...).
This dramatically reduces code mess in certain cases.
> But Python also believes that simple is better than complex
Sure.
--
Evgeny
--
You received this message because you are subscribed to the Google Groups
"pylons-discuss" 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/pylons-discuss?hl=en.