Skip to content
New issue

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

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Determine how to handle GET params #2

Open
tswicegood opened this issue Nov 17, 2010 · 2 comments
Open

Determine how to handle GET params #2

tswicegood opened this issue Nov 17, 2010 · 2 comments

Comments

@tswicegood
Copy link
Contributor

Taking simple views and turning them into ESI requests is pretty straight forward, but we have the issue of passing GET parameters into the {% esi %} template tag. Opening up this ticket to discuss potential solutions.

@tswicegood
Copy link
Contributor Author

Do nothing solution

Do nothing. Wanna use GET params, no dice.

Allow strings

We could scan for double quotes and treat those as full URLs. Seems pretty clunky.

Make {%esi%} a block tag

The idea would be to wrap whatever is in the block as a URL. Something like:

{% esi %}{% url hello_world %}{% endesi %}

Not ideal, but it does provide a pretty straight forward way to handle GET params. For example:

{% esi %}{% url hello_world %}?id=123{% endesi %}

If we go this route, I'd say that the absence of any parameters inside the template tag is what turns it into a URL. If any parameters are specified, its treated like a regular parameter.

@tswicegood
Copy link
Contributor Author

Additional parameter

We could add an optional parameter to the {% esi %} that looks for something that starts with a "?" and treat that as GET param. Nice and simple, but it does have the drawback of meaning variables inside the GET params are either not supported or we right a mini template parser for the variables.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant