sagemath/sagemath-flask.patch
2013-08-05 18:34:44 -03:00

32 lines
1.7 KiB
Diff

diff -up sage-5.10/spkg/build/sagenb-0.10.4/src/sagenb/flask_version/base.py.orig sage-5.10/spkg/build/sagenb-0.10.4/src/sagenb/flask_version/base.py
--- sage-5.10/spkg/build/sagenb-0.10.4/src/sagenb/flask_version/base.py.orig 2013-07-30 17:57:58.985060198 -0300
+++ sage-5.10/spkg/build/sagenb-0.10.4/src/sagenb/flask_version/base.py 2013-07-30 17:58:31.958061460 -0300
@@ -55,28 +55,6 @@ class SageNBFlask(Flask):
endpoint='/static'+base_url,
view_func=partial(self.static_view_func, root_path))
- def save_session(self, session, response):
- """
- This method needs to stay in sync with the version in Flask.
- The only modification made to it is the ``httponly=False``
- passed to ``save_cookie``.
-
- Saves the session if it needs updates. For the default
- implementation, check :meth:`open_session`.
-
- :param session: the session to be saved (a
- :class:`~werkzeug.contrib.securecookie.SecureCookie`
- object)
- :param response: an instance of :attr:`response_class`
- """
- expires = domain = None
- if session.permanent:
- expires = datetime.utcnow() + self.permanent_session_lifetime
- if self.config['SERVER_NAME'] is not None:
- domain = '.' + self.config['SERVER_NAME']
- session.save_cookie(response, self.session_cookie_name,
- expires=expires, httponly=False, domain=domain)
-
def message(self, msg, cont='/', username=None, **kwds):
"""Returns an error message to the user."""
template_dict = {'msg': msg, 'cont': cont, 'username': username}