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

Make it possible to access request objects in templates. #173

Closed
wants to merge 1 commit into from

Conversation

fdevibe
Copy link
Contributor

@fdevibe fdevibe commented Dec 12, 2012

In Django, it is possible to access the request object in templates by adding the proper context processor (https://docs.djangoproject.com/en/dev/ref/templates/api/#django-core-context-processors-request). I don't know how to implement this more generally in ChicagoBoss, but here's an attempt at a specific way to do it. It means a setting will be required to use it (as with Django), but it is not a generic context processor replacement. If there's a better way, I'd be very interested to learn more about it.

Briefly tested and seems to work.

Requires request_in_templates set to true in the settings
file, and will make the request object available as
_request in templates.
@fdevibe
Copy link
Contributor Author

fdevibe commented Jan 15, 2013

Closing this in favor of #180

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

Successfully merging this pull request may close these issues.

None yet

1 participant