On Mon, Nov 2, 2009 at 7:04 AM, morellik <[email protected]> wrote:
>
> I tried to create a static route in routing.py:
>
> map.connect('credit_card', 'https://www.credit_card.com',
> _static=True)
>
> and use it in the form:
>
> <form action="${h.url_for('credit_card')}" method="POST">
>
> without results.
>
> After pressing submit  I see the same page with all input fields
> values in the navigation toolbar of the browser, e.g.
>
> I see [http://localhost:5001/user/payment/] and after submit I  see
> [http://localhost:5001/user/payment/?
> tr_id=00000&amount=00010&email=...@ddd]

What does "View Source" show in the browser?  The behavior is
consistent with <form action="" method="POST" />, which could happen
if url_for returned None.  That in turn would indicate it couldn't
match the route name, and then we'd have to investigate why.

Also, what happens if you replace the h.url_for call with
``url('credit_card')``.  url_for is gradually being replaced by
pylons.url, which has a different implementation and thus may behave
differently.

Another possiblility is that a different route is matching, something
earlier in the route definitions.

As a workaround, you can use a 'c' variable for the URL.  Routes does
not provide much advantage for external URLs, other than the
convenience of defining them in the route map.

-- 
Mike Orr <[email protected]>

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

Reply via email to