and in route.py
--------------------------------------------------------------------------------------------------------------------
# Don't bother forming stuff we don't need if its a static route
self.static = kargs.pop('_static', False)
self.filter = kargs.pop('_filter', None)
self.absolute = kargs.pop('_absolute', False)
On Fri, Oct 8, 2010 at 3:37 PM, yaming deng <[email protected]> wrote:
> in mapper.py ,line 823
>
>
> ----------------------------------------------------------------------------------------------------------
> path = route.generate(**kargs)
> if path:
> if self.prefix:
> path = self.prefix + path
> external_static = route.static and route.external
> if environ and environ.get('SCRIPT_NAME', '') != ''\
> and not route.absolute and not external_static:
> path = environ['SCRIPT_NAME'] + path
> key = cache_key_script_name
> else:
> key = cache_key
> if self.urlcache is not None:
> self.urlcache[key] = str(path)
> return str(path)
> else:
> continue
>
> ---------------------------------------------------------------------------------------------
> any idea /?
>
> On Fri, Oct 8, 2010 at 2:53 PM, yaming deng <[email protected]> wrote:
>
>> all named route does not work. by adding current SCRIPT_NAME to the front,
>> change everything
>>
>>
>> On Fri, Oct 8, 2010 at 2:50 PM, yaming deng <[email protected]> wrote:
>>
>>> code like this:
>>>
>>> ----------------------------------------------------------------------------------------------------------------------------------
>>> map = Mapper(directory=config['pylons.paths']['controllers'],
>>> always_scan=config['debug'])
>>> map.minimization = True
>>> map.explicit=True
>>>
>>> map.connect('shopping',
>>> '/shopping/{action}',controller='shopping',action='index')
>>>
>>>
>>> ---------------------------------------------------------------------------------------------------------------------------------
>>> and
>>> <a href="${h.url('shopping')}">shopping</a> --------------- named
>>> route
>>> ---------------------------------------------
>>> i got :
>>>
>>> <a href="//shopping">shopping</a>
>>>
>>> ------------------------------------------------------------------------
>>>
>>> Routes : 1.12.3
>>> Pylons: 1.0
>>> ---------------------------------------
>>>
>>
>>
>
--
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.