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

NoReverseMatch: Reverse for 'session_security_ping' not found. #114

Open
Lionqueen94 opened this issue Aug 15, 2018 · 3 comments
Open

NoReverseMatch: Reverse for 'session_security_ping' not found. #114

Lionqueen94 opened this issue Aug 15, 2018 · 3 comments

Comments

@Lionqueen94
Copy link

Hi there!
I love this app for my Django projects, but I have recently updated from Django 2.0 to Django 2.1 and now I'm getting this error:

Internal Server Error: /session_security/ping/
Traceback (most recent call last):
  File "/home/ellen/ownCloud/virtualenvs/purple_box/lib/python3.6/site-packages/django/core/handlers/exception.py", line 34, in inner
    response = get_response(request)
  File "/home/ellen/ownCloud/virtualenvs/purple_box/lib/python3.6/site-packages/django/utils/deprecation.py", line 90, in __call__
    response = self.process_request(request)
  File "/home/ellen/ownCloud/virtualenvs/purple_box/lib/python3.6/site-packages/session_security/middleware.py", line 76, in process_request
    elif (request.path == reverse('session_security_ping') and
  File "/home/ellen/ownCloud/virtualenvs/purple_box/lib/python3.6/site-packages/django/urls/base.py", line 90, in reverse
    return iri_to_uri(resolver._reverse_with_prefix(view, prefix, *args, **kwargs))
  File "/home/ellen/ownCloud/virtualenvs/purple_box/lib/python3.6/site-packages/django/urls/resolvers.py", line 622, in _reverse_with_prefix
    raise NoReverseMatch(msg)
django.urls.exceptions.NoReverseMatch: Reverse for 'session_security_ping' not found. 'session_security_ping' is not a valid view function or pattern name.

Session security still seems to work, but getting this traceback in my logs is not ideal. I hope you can upgrade the compatibility to Django 2.1.
Thanks!

@Lionqueen94 Lionqueen94 changed the title Django 2.1 compatibility request NoReverseMatch: Reverse for 'session_security_ping' not found. Aug 15, 2018
@jpic
Copy link
Member

jpic commented Jan 4, 2019

The url is defined here : https://github.com/yourlabs/django-session-security/blob/master/session_security/urls.py

Are you sure you have included them in your root urlconf ?

@Lionqueen94
Copy link
Author

I do have them in my urls.py and the feature was actually working fine. I just kept seeing that traceback in my logs every time the warning would kick in. In the current project I'm working on I don't get the errors, so I guess it works... :)

@jpic
Copy link
Member

jpic commented Jan 4, 2019

Do you think this could be happening before django discovers urls ?

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

No branches or pull requests

2 participants