Re: get complete url of "app:static" as string ?

2011-06-09 Thread Michael Merickel
URLs in pyramid are generated based on the context of the request. Therefore if there is no request telling the generator what the host/port/subpath are, pyramid will not know the correct URL to generate. You can trick pyramid with a fake request, but that's just the way it is. You may want to ju

get complete url of "app:static" as string ?

2011-06-09 Thread mehdi0016
Hi I want to get complete url of static path of my app as string, but i want to do it in main() function when config created. config = Configurator(settings=settings) config.add_static_view('static', 'digitalmap:static') #here i want to get http://www.myapp.com/static Is it possible? how? thanks.

Re: pyramid.url.static_url does not allow absolute paths

2011-06-09 Thread Bruno Binet
I would go back to this thread since I need to generate urls for static files served by add_static_view from an absolute path on the filesystem. But as Daniel mentionned, pyramid.url.static_url does not support absolute path as argument. What is the reason for that behavior, and is there a workaro

Re: pyramid.url.static_url does not allow absolute paths

2011-06-09 Thread Bruno Binet
On 9 June 2011 23:59, Bruno Binet wrote: > I would go back to this thread since I need to generate urls for > static files served by add_static_view from an absolute path on the > filesystem. But as Daniel mentionned, pyramid.url.static_url does not > support absolute path as argument. > > What is

Re: multiple escape filters for mako

2011-06-09 Thread Jason
I believe it is patched to use the html filter by default, but not escape None to an empty string. Since I am overwriting the default_filters setting I needed to speciy that I want "h" filter and my own filter. -- Jason -- You received this message because you are subscribed to the Google Grou

Re: multiple escape filters for mako

2011-06-09 Thread Mike Orr
On Thu, Jun 9, 2011 at 10:49 AM, Jason wrote: > Hello, > Using Pyramid I would like to filter expression that evaluate to None to be > output as an empty string instead of "None". I have made a filter: > def none_escape(value): >     """ Returns empty string if value is None - used as Mako filter.

Re: multiple escape filters for mako

2011-06-09 Thread Jason
Looks like it was something trivial. I needed to format the default filters line as: mako.default_filters = none_escape h And they are required to be in that order. If i put them as: mako.default_filters = h none_escape Then none_escape was not used. In the working order I c

multiple escape filters for mako

2011-06-09 Thread Jason
Hello, Using Pyramid I would like to filter expression that evaluate to None to be output as an empty string instead of "None". I have made a filter: def none_escape(value): """ Returns empty string if value is None - used as Mako filter. """ return value if value is not None else '' an

issue to deploy pylons application under mod_wsgi

2011-06-09 Thread Haulyn Jason
Hi, I have deployed my website under mod_wsgi with apache. I have Trac and moinmoin working under mod_wsgi within the same apache. my mod.wsgi is the following: import os, sys import site site.addsitedir('/opt/pylonsevn/lib/python2.6/site-packages/') sys.path.append('/var/www/domix.us') os.enviro