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
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.
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
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
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
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.
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
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
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