Skip to content

Commit

Permalink
use even less deprecated things
Browse files Browse the repository at this point in the history
  • Loading branch information
t-8ch committed Jan 25, 2021
1 parent 63ebfa7 commit 5f6c38e
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions oscad/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from collections import namedtuple

from pyramid.config import Configurator
from pyramid.session import SignedCookieSessionFactory
from pyramid.session import SignedCookieSessionFactory, JSONSerializer
from pyramid.settings import asbool

import jinja2
Expand Down Expand Up @@ -117,7 +117,10 @@ def main(global_config, **settings):
config.add_renderer('scss', ScssRenderer)

config.set_locale_negotiator(locale_negotiator)
config.set_session_factory(SignedCookieSessionFactory(''))
config.set_session_factory(SignedCookieSessionFactory(
'',
httponly=True,
serializer=JSONSerializer))
config.add_subscriber('oscad.subscribers.add_renderer_globals',
'pyramid.events.BeforeRender')
config.add_subscriber('oscad.subscribers.jsonify',
Expand Down

0 comments on commit 5f6c38e

Please sign in to comment.