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

fix jinja2 rendering for password protected notebooks #2699

Merged
merged 2 commits into from Dec 19, 2012
Merged

fix jinja2 rendering for password protected notebooks #2699

merged 2 commits into from Dec 19, 2012

Conversation

crbates
Copy link
Contributor

@crbates crbates commented Dec 18, 2012

This fixes the jinja2 rendering for ipython notebooks and runs the url_escape function in python since there is no equivalent in jinja2.

@shabbychef
Copy link

I installed ipython-notebook from Julian Taylor's ppa today, and keep getting some error about jinja2 endblock; maybe this pull request will fix my issue? (fingers crossed)

@@ -225,7 +226,7 @@ class LoginHandler(AuthenticatedHandler):
def _render(self, message=None):
template = self.application.jinja2_env.get_template('login.html')
self.write( template.render(
next=self.get_argument('next', default=self.application.ipython_app.base_project_url),
next=tornado.escape.url_escape(self.get_argument('next', default=self.application.ipython_app.base_project_url)),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tornado.escape is only available here because importing web and websocket imports escape, whereas doing just import tornado does not. We should be explicit and either import tornado.escape or from tornado.escape import url_escape

@Carreau
Copy link
Member

Carreau commented Dec 19, 2012

Great, merging now that comments are fix... let's taget < 30 opened PRs...

Carreau added a commit that referenced this pull request Dec 19, 2012
fix jinja2 rendering for password protected notebooks
@Carreau Carreau merged commit fac6291 into ipython:master Dec 19, 2012
mattvonrocketstein pushed a commit to mattvonrocketstein/ipython that referenced this pull request Nov 3, 2014
fix jinja2 rendering for password protected notebooks
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

4 participants