Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Add some way to generate application-relative URLs #50

Closed
agronholm opened this Issue Jun 30, 2011 · 2 comments

Comments

Projects
None yet
2 participants

There should be some way to generate URLs relative to the application root.
Perhaps with paste's PrefixMiddleware or similar approach?

Current suggestion: let each Dialect choose whether they want SCRIPT_NAME and PATH_INFO mangled.
A new url() function should be provided in the template namespace to generate URLs relative to the application root.

Owner

amcgregor commented Aug 21, 2011

Pushed in feature/50-url with full unit tests and docstring documentation. Ticket closed unless merge sign-off by @agronholm isn't approved.

@amcgregor amcgregor closed this Aug 21, 2011

@amcgregor amcgregor added a commit that referenced this issue Sep 3, 2011

@amcgregor amcgregor Merge of feature/50-url, resolving #50.
Squashed commit of the following:

commit 45d5136058ba94a0c5093202e50757a8c8b58d18
Author: Alice Bevan-McGregor <alice@gothcandy.com>
Date:   Sat Sep 3 15:16:53 2011 -0400

    Added `marrow.util` dependancy.

commit 544c5b1337caae9cdf18348a452bb943cadfdcb3
Author: Alice Bevan-McGregor <alice@gothcandy.com>
Date:   Sat Sep 3 15:07:02 2011 -0400

    Minor PEP-8-ifcation.

commit 0112df47110d0c46b1af3125a011c62144f75722
Author: Alice Bevan-McGregor <alice@gothcandy.com>
Date:   Sun Aug 21 14:44:15 2011 -0400

    Additional tests for non-root application and correction of minor bug found by the tests.

commit 71c93566fec2883f1df4f8d5995b2b0faba05073
Author: Alice Bevan-McGregor <alice@gothcandy.com>
Date:   Sun Aug 21 14:36:00 2011 -0400

    Added tests and shuffled import around to prevent circular references.

commit 2bd8abe27aadf52016772fc1fdbe394c8d556bc8
Author: Alice Bevan-McGregor <alice@gothcandy.com>
Date:   Sat Aug 20 14:01:01 2011 -0400

    WebCore now keeps track of the current controller path (vs. controller + method which is stored in script_name during method execution) and the URL helper seems to work well, as demonstrated in the examples/url.py demonstration.

commit 9fa3e30ed09d18312817196e39a5af08c32b2d37
Author: Alice Bevan-McGregor <alice@gothcandy.com>
Date:   Fri Aug 19 23:52:56 2011 -0400

    Moved the url module to the correct location and extracted the template namespace declaration to match the others.

commit c8731052dddaa65b32017ac0e9508e79d9635d31
Author: Alice Bevan-McGregor <alice@gothcandy.com>
Date:   Fri Aug 19 23:45:52 2011 -0400

    Basic syntax declaration and some documentation strings.

commit 3c1d0ad25756658877ab0bb23a6885497172d762
Author: Alice Bevan-McGregor <alice@gothcandy.com>
Date:   Fri Aug 19 23:09:32 2011 -0400

    Now stores original SCRIPT_NAME in environment for use by the url object.
7eb94b9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment