Skip to content

remove search_analytics #6349

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

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 1 addition & 6 deletions readthedocs/projects/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -1443,7 +1443,6 @@ def add_features(sender, **kwargs):
EXTERNAL_VERSION_BUILD = 'external_version_build'
UPDATE_CONDA_STARTUP = 'update_conda_startup'
CONDA_APPEND_CORE_REQUIREMENTS = 'conda_append_core_requirements'
SEARCH_ANALYTICS = 'search_analytics'

FEATURES = (
(USE_SPHINX_LATEST, _('Use latest version of Sphinx')),
Expand Down Expand Up @@ -1494,11 +1493,7 @@ def add_features(sender, **kwargs):
(
CONDA_APPEND_CORE_REQUIREMENTS,
_('Append Read the Docs core requirements to environment.yml file'),
),
(
SEARCH_ANALYTICS,
_('Enable search analytics'),
)
),
)

projects = models.ManyToManyField(
Expand Down
6 changes: 1 addition & 5 deletions readthedocs/projects/views/private.py
Original file line number Diff line number Diff line change
Expand Up @@ -934,11 +934,7 @@ def get_context_data(self, **kwargs):
context = super().get_context_data(**kwargs)
project = self.get_project()

context['show_analytics'] = project.has_feature(
Feature.SEARCH_ANALYTICS,
)
if not context['show_analytics']:
return context


# data for plotting the line-chart
query_count_of_1_month = SearchQuery.generate_queries_count_of_one_month(
Expand Down