Skip to content

User interface fails without session middleware #347

@claradaia

Description

@claradaia

Hello, guys. I am trying to integrate silk with my existing app which does not use the atuhentication or sessions middleware. Because of that, I get the following error when I try to access /silk:

...
   File "/usr/local/lib/python3.6/site-packages/silk/views/summary.py", line 78, in get
     c = self._create_context(request)
   File "/usr/local/lib/python3.6/site-packages/silk/views/summary.py", line 57, in _create_context
     raw_filters = request.session.get(self.filters_key, {})
 AttributeError: 'WSGIRequest' object has no attribute 'session'

Is there a workaround? I considered just copying the views and tweaking until it worked, but looking at the code I wonder if the sessions are essential for the proper function of the interface. If so, maybe add a warning about that to the docs?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions