Skip to content

Commit

Permalink
Remove all flask search references in favour of RTD
Browse files Browse the repository at this point in the history
  • Loading branch information
aaryanporwal committed Sep 30, 2024
1 parent f356969 commit 3ad99ea
Show file tree
Hide file tree
Showing 7 changed files with 1 addition and 299 deletions.
5 changes: 0 additions & 5 deletions konf/site.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,6 @@ env:
- name: SENTRY_DSN
value: https://37706e022f2841448dbb094990420522@sentry.is.canonical.com//23

- name: FLASK_GOOGLE_SEARCH_API_KEY
secretKeyRef:
key: google-custom-search-key
name: google-api

- name: FLASK_SECRET_KEY
secretKeyRef:
key: anbox-cloud-io
Expand Down
4 changes: 1 addition & 3 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
canonicalwebteam.flask-base==1.1.0
canonicalwebteam.discourse==5.6.1
canonicalwebteam.flask-base==2.0.0
Flask-OpenID==1.3.0
requests==2.32.2
responses==0.24.1
pymacaroons==0.13.0
canonicalwebteam.image-template==1.3.1
canonicalwebteam.search==1.3.0
maxminddb-geolite2==2018.703
8 changes: 0 additions & 8 deletions static/sass/_pattern_docs.scss

This file was deleted.

2 changes: 0 additions & 2 deletions static/sass/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

// import site specific patterns and overrides
@import "pattern_deployment-table";
@import "pattern_docs";
@import "pattern_heading-icon";
@import "pattern_matrix";
@import "pattern_navigation";
Expand All @@ -25,7 +24,6 @@
@import "pattern_footer";

@include anbox-p-deployment-table;
@include anbox-p-docs;
@include anbox-p-heading-icon;
@include anbox-p-matrix;
@include anbox-p-navigation;
Expand Down
157 changes: 0 additions & 157 deletions templates/docs/document.html

This file was deleted.

92 changes: 0 additions & 92 deletions templates/docs/search.html

This file was deleted.

32 changes: 0 additions & 32 deletions webapp/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,14 @@

import flask
import requests
import talisker
from flask import request

from canonicalwebteam.discourse import (
DiscourseAPI,
Docs,
DocParser,
)
from canonicalwebteam.flask_base.app import FlaskBase
from flask_openid import OpenID
from pymacaroons import Macaroon
from webapp.macaroons import MacaroonRequest, MacaroonResponse
from posixpath import join as url_join
from canonicalwebteam import image_template
from canonicalwebteam.search import build_search_view

from webapp.views import get_user_country_by_ip

Expand All @@ -42,31 +35,6 @@
extension_responses=[MacaroonResponse],
)

# Discourse docs
session = talisker.requests.get_session()

discourse_docs = Docs(
parser=DocParser(
api=DiscourseAPI(
base_url="https://discourse.ubuntu.com/", session=session
),
index_topic_id=17029,
url_prefix="/docs",
),
document_template="docs/document.html",
url_prefix="/docs",
)
discourse_docs.init_app(app)

app.add_url_rule(
"/docs/search",
"docs-search",
build_search_view(
session=session,
site="anbox-cloud.io/docs",
template_path="docs/search.html",
),
)

app.add_url_rule("/user-country.json", view_func=get_user_country_by_ip)

Expand Down

0 comments on commit 3ad99ea

Please sign in to comment.