-
Notifications
You must be signed in to change notification settings - Fork 36
Open
Description
I wanted to use TRACK_USAGE_INCLUDE_OR_EXCLUDE_VIEWS = 'exclude'
to track every view except the admin view, however it tracked too the requests for static files (which I don't want to track), creating a lot of entries in the database.
I tried to exclude it with
tracker.exclude("/static")
But when requesting static files, TrackUsage.before_request
-> self.app.view_functions.get(ctx.request.endpoint)
view_func = self.app.view_functions.get(ctx.request.endpoint) |
This could be very handy for semi-large/large applications where is faster just exclude 1 view than include all the other views.
I have seen that ctx.request.path
returns the path (/, /static, /admin, etc), maybe checking both possibilities, views and routes could be a solution for this?
Metadata
Metadata
Assignees
Labels
No labels