Ches Martin <[EMAIL PROTECTED]> writes:
>> [how I do Cascading static files]
> Thanks for sharing this stuff, Yannick. One of those things I knew I
> was going to need at some point. It *would* be nice if some of this
> was doable from the .ini. At any rate, sounds like a good start for a
> cookbook entry on a "skinning" setup :-)
Well, once you reach that point it's trivial to add .ini lookup. My
.ini looks like:
[app:main]
extra_templates = %(here)s/extra_templates
extra_statics = %(here)s/extra_statics
...
environment.py has
paths = dict(root=root,
controllers=os.path.join(root, 'controllers'),
static_files=[app_conf["extra_statics"],
os.path.join(root, 'public')],
templates=[app_conf["extra_templates"],
os.path.join(root, 'templates'),])
and middleware.py has
# Static files
javascripts_app = StaticJavascripts()
static_apps = [StaticURLParser(path)
for path in config['pylons.paths']['static_files']]
app = Cascade(static_apps + [javascripts_app, app])
return app
--
Yannick Gingras
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---