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

No data profiled #25

Closed
saintger opened this issue Jul 17, 2014 · 3 comments
Closed

No data profiled #25

saintger opened this issue Jul 17, 2014 · 3 comments
Labels

Comments

@saintger
Copy link

I am not sure but for me the URL of 'summary' is /silk, so I had to change this code in middleware.py:

def _should_intercept(request):
    """we want to avoid recording any requests/sql queries etc that belong to Silky"""
    fpath = silky_reverse('summary')
    path = '/'.join(fpath.split('/')[0:-1])
    silky = request.path.startswith(path)
    ignored = request.path in SilkyConfig().SILKY_IGNORE_PATHS
    return not (silky or ignored)

To this code:

def _should_intercept(request):
    """we want to avoid recording any requests/sql queries etc that belong to Silky"""
    fpath = silky_reverse('summary')
    silky = request.path.startswith(fpath)
    ignored = request.path in SilkyConfig().SILKY_IGNORE_PATHS
    return not (silky or ignored)
@mtford90
Copy link
Collaborator

Interesting, I'll take a look. I recently made some changes to the URLs due to some other bugs so I may have caused a regression.

Cheers.

@mtford90 mtford90 added the bug label Jul 17, 2014
@mackeian
Copy link
Contributor

+1 having the same issue here, the split gives '' and thus _should_intercept always returns False. Django 1.6/Postgresql.

mackeian added a commit to mackeian/silk that referenced this issue Jul 21, 2014
mackeian added a commit to mackeian/silk that referenced this issue Jul 21, 2014
@mtford90
Copy link
Collaborator

Fixed by @mackeian in #28

pablodiazgutierrez pushed a commit to appfluence/django-silk that referenced this issue Oct 18, 2020
yaroslav0114 pushed a commit to yaroslav0114/django-silk that referenced this issue Dec 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants