Repository navigation
feat: show the site of every endpoint in the statistics - #2
Merged
Merged
Conversation
Endpoint.site_id was recorded but invisible in the stats: the changelist did not show it and there was no filter, and the Endpoints list showed a raw number. - Site column in both changelists, showing the domain when django.contrib.sites is installed (the raw id otherwise) - Site filter in both, listing the sites by domain - The labels are cached for a minute: the table is tiny and read per row - 85 tests (the test settings now install django.contrib.sites)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Several front ends (several
django.contrib.sites) can call the same backend, andEndpoint.site_idwas recorded but invisible: the stats changelist did not show it and there was no filter, while the Endpoints list showed a raw number.What
foo.com) whendjango.contrib.sitesis installed, and falls back to the raw id when it is not — the package still does not require the sites framework.reset_site_labels_cache()clears it (used by the tests).site_idas it was.Tests
tests/test_sites.py: the column shows the domain in both changelists, the filter narrows to one site, and it offers every site by domain.django.contrib.sites(SITE_ID = 1).ruffandblackclean.Also
Version bumped to 0.1.9. The release stays gated: no GitHub release or PyPI publish until it is reviewed.
Note
The request mentioned one more thing after "…they probably also get made towards the frontend and" — if there is more to it, tell me and I will extend this PR.