logo

searx

My custom branche(s) on searx, a meta-search engine
commit: bee7b497a300622f5ba2b619817f5c89c29ae871
parent: aaf5d506e51197603922d7b9d259c0f4e498f62b
Author: Adam Tauber <asciimoo@gmail.com>
Date:   Thu, 22 Sep 2016 23:51:07 +0200

[mod] rename "default" theme to "legacy"

Diffstat:

Mmanage.sh4++--
Msearx/settings_robot.yml2+-
Rsearx/static/themes/default/css/style-rtl.css -> searx/static/themes/legacy/css/style-rtl.css0
Rsearx/static/themes/default/css/style.css -> searx/static/themes/legacy/css/style.css0
Rsearx/static/themes/default/img/favicon.png -> searx/static/themes/legacy/img/favicon.png0
Rsearx/static/themes/default/img/github_ribbon.png -> searx/static/themes/legacy/img/github_ribbon.png0
Rsearx/static/themes/default/img/icons/icon_500px.ico -> searx/static/themes/legacy/img/icons/icon_500px.ico0
Rsearx/static/themes/default/img/icons/icon_bing.ico -> searx/static/themes/legacy/img/icons/icon_bing.ico0
Rsearx/static/themes/default/img/icons/icon_dailymotion.ico -> searx/static/themes/legacy/img/icons/icon_dailymotion.ico0
Rsearx/static/themes/default/img/icons/icon_deezer.ico -> searx/static/themes/legacy/img/icons/icon_deezer.ico0
Rsearx/static/themes/default/img/icons/icon_deviantart.ico -> searx/static/themes/legacy/img/icons/icon_deviantart.ico0
Rsearx/static/themes/default/img/icons/icon_digg.ico -> searx/static/themes/legacy/img/icons/icon_digg.ico0
Rsearx/static/themes/default/img/icons/icon_duckduckgo.ico -> searx/static/themes/legacy/img/icons/icon_duckduckgo.ico0
Rsearx/static/themes/default/img/icons/icon_flickr.ico -> searx/static/themes/legacy/img/icons/icon_flickr.ico0
Rsearx/static/themes/default/img/icons/icon_github.ico -> searx/static/themes/legacy/img/icons/icon_github.ico0
Rsearx/static/themes/default/img/icons/icon_google play apps.ico -> searx/static/themes/legacy/img/icons/icon_google play apps.ico0
Rsearx/static/themes/default/img/icons/icon_google play movies.ico -> searx/static/themes/legacy/img/icons/icon_google play movies.ico0
Rsearx/static/themes/default/img/icons/icon_google play music.ico -> searx/static/themes/legacy/img/icons/icon_google play music.ico0
Rsearx/static/themes/default/img/icons/icon_google.ico -> searx/static/themes/legacy/img/icons/icon_google.ico0
Rsearx/static/themes/default/img/icons/icon_kickass.ico -> searx/static/themes/legacy/img/icons/icon_kickass.ico0
Rsearx/static/themes/default/img/icons/icon_openstreetmap.ico -> searx/static/themes/legacy/img/icons/icon_openstreetmap.ico0
Rsearx/static/themes/default/img/icons/icon_searchcode code.ico -> searx/static/themes/legacy/img/icons/icon_searchcode code.ico0
Rsearx/static/themes/default/img/icons/icon_searchcode doc.ico -> searx/static/themes/legacy/img/icons/icon_searchcode doc.ico0
Rsearx/static/themes/default/img/icons/icon_searchcode.ico -> searx/static/themes/legacy/img/icons/icon_searchcode.ico0
Rsearx/static/themes/default/img/icons/icon_soundcloud.ico -> searx/static/themes/legacy/img/icons/icon_soundcloud.ico0
Rsearx/static/themes/default/img/icons/icon_stackoverflow.ico -> searx/static/themes/legacy/img/icons/icon_stackoverflow.ico0
Rsearx/static/themes/default/img/icons/icon_startpage.ico -> searx/static/themes/legacy/img/icons/icon_startpage.ico0
Rsearx/static/themes/default/img/icons/icon_subtitleseeker.ico -> searx/static/themes/legacy/img/icons/icon_subtitleseeker.ico0
Rsearx/static/themes/default/img/icons/icon_twitter.ico -> searx/static/themes/legacy/img/icons/icon_twitter.ico0
Rsearx/static/themes/default/img/icons/icon_vimeo.ico -> searx/static/themes/legacy/img/icons/icon_vimeo.ico0
Rsearx/static/themes/default/img/icons/icon_wikipedia.ico -> searx/static/themes/legacy/img/icons/icon_wikipedia.ico0
Rsearx/static/themes/default/img/icons/icon_yahoo.ico -> searx/static/themes/legacy/img/icons/icon_yahoo.ico0
Rsearx/static/themes/default/img/icons/icon_youtube.ico -> searx/static/themes/legacy/img/icons/icon_youtube.ico0
Rsearx/static/themes/default/img/preference-icon.png -> searx/static/themes/legacy/img/preference-icon.png0
Rsearx/static/themes/default/img/search-icon.png -> searx/static/themes/legacy/img/search-icon.png0
Rsearx/static/themes/default/img/searx.png -> searx/static/themes/legacy/img/searx.png0
Rsearx/static/themes/default/img/searx_logo.svg -> searx/static/themes/legacy/img/searx_logo.svg0
Rsearx/static/themes/default/js/searx.js -> searx/static/themes/legacy/js/searx.js0
Rsearx/static/themes/default/less/autocompleter.less -> searx/static/themes/legacy/less/autocompleter.less0
Rsearx/static/themes/default/less/code.less -> searx/static/themes/legacy/less/code.less0
Rsearx/static/themes/default/less/definitions.less -> searx/static/themes/legacy/less/definitions.less0
Rsearx/static/themes/default/less/mixins.less -> searx/static/themes/legacy/less/mixins.less0
Rsearx/static/themes/default/less/search.less -> searx/static/themes/legacy/less/search.less0
Rsearx/static/themes/default/less/style-rtl.less -> searx/static/themes/legacy/less/style-rtl.less0
Rsearx/static/themes/default/less/style.less -> searx/static/themes/legacy/less/style.less0
Dsearx/templates/default/404.html9---------
Dsearx/templates/default/about.html66------------------------------------------------------------------
Dsearx/templates/default/index.html18------------------
Dsearx/templates/default/preferences.html129-------------------------------------------------------------------------------
Dsearx/templates/default/results.html100-------------------------------------------------------------------------------
Dsearx/templates/default/search.html8--------
Dsearx/templates/default/stats.html22----------------------
Asearx/templates/legacy/404.html9+++++++++
Asearx/templates/legacy/about.html66++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Rsearx/templates/default/base.html -> searx/templates/legacy/base.html0
Rsearx/templates/default/categories.html -> searx/templates/legacy/categories.html0
Rsearx/templates/default/github_ribbon.html -> searx/templates/legacy/github_ribbon.html0
Asearx/templates/legacy/index.html18++++++++++++++++++
Rsearx/templates/default/infobox.html -> searx/templates/legacy/infobox.html0
Rsearx/templates/default/opensearch.xml -> searx/templates/legacy/opensearch.xml0
Rsearx/templates/default/opensearch_response_rss.xml -> searx/templates/legacy/opensearch_response_rss.xml0
Asearx/templates/legacy/preferences.html129+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Rsearx/templates/default/result_templates/code.html -> searx/templates/legacy/result_templates/code.html0
Rsearx/templates/default/result_templates/default.html -> searx/templates/legacy/result_templates/default.html0
Rsearx/templates/default/result_templates/images.html -> searx/templates/legacy/result_templates/images.html0
Rsearx/templates/default/result_templates/map.html -> searx/templates/legacy/result_templates/map.html0
Rsearx/templates/default/result_templates/torrent.html -> searx/templates/legacy/result_templates/torrent.html0
Rsearx/templates/default/result_templates/videos.html -> searx/templates/legacy/result_templates/videos.html0
Asearx/templates/legacy/results.html100+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Asearx/templates/legacy/search.html8++++++++
Asearx/templates/legacy/stats.html22++++++++++++++++++++++
Msearx/templates/pix-art/preferences.html2+-
Msearx/templates/pix-art/stats.html2+-
Mtests/robot/test_basic.robot4++--
Mtests/unit/test_webapp.py4++--
75 files changed, 361 insertions(+), 361 deletions(-)

diff --git a/manage.sh b/manage.sh @@ -53,8 +53,8 @@ build_style() { styles() { echo '[!] Building styles' - build_style themes/default/less/style.less themes/default/css/style.css - build_style themes/default/less/style-rtl.less themes/default/css/style-rtl.css + build_style themes/legacy/less/style.less themes/legacy/css/style.css + build_style themes/legacy/less/style-rtl.less themes/legacy/css/style-rtl.css build_style themes/courgette/less/style.less themes/courgette/css/style.css build_style themes/courgette/less/style-rtl.less themes/courgette/css/style-rtl.css build_style less/bootstrap/bootstrap.less css/bootstrap.min.css diff --git a/searx/settings_robot.yml b/searx/settings_robot.yml @@ -15,7 +15,7 @@ server: ui: themes_path : "" - default_theme : default + default_theme : legacy default_locale : "" outgoing: diff --git a/searx/static/themes/default/css/style-rtl.css b/searx/static/themes/legacy/css/style-rtl.css diff --git a/searx/static/themes/default/css/style.css b/searx/static/themes/legacy/css/style.css diff --git a/searx/static/themes/default/img/favicon.png b/searx/static/themes/legacy/img/favicon.png Binary files differ. diff --git a/searx/static/themes/default/img/github_ribbon.png b/searx/static/themes/legacy/img/github_ribbon.png Binary files differ. diff --git a/searx/static/themes/default/img/icons/icon_500px.ico b/searx/static/themes/legacy/img/icons/icon_500px.ico Binary files differ. diff --git a/searx/static/themes/default/img/icons/icon_bing.ico b/searx/static/themes/legacy/img/icons/icon_bing.ico Binary files differ. diff --git a/searx/static/themes/default/img/icons/icon_dailymotion.ico b/searx/static/themes/legacy/img/icons/icon_dailymotion.ico Binary files differ. diff --git a/searx/static/themes/default/img/icons/icon_deezer.ico b/searx/static/themes/legacy/img/icons/icon_deezer.ico Binary files differ. diff --git a/searx/static/themes/default/img/icons/icon_deviantart.ico b/searx/static/themes/legacy/img/icons/icon_deviantart.ico Binary files differ. diff --git a/searx/static/themes/default/img/icons/icon_digg.ico b/searx/static/themes/legacy/img/icons/icon_digg.ico Binary files differ. diff --git a/searx/static/themes/default/img/icons/icon_duckduckgo.ico b/searx/static/themes/legacy/img/icons/icon_duckduckgo.ico Binary files differ. diff --git a/searx/static/themes/default/img/icons/icon_flickr.ico b/searx/static/themes/legacy/img/icons/icon_flickr.ico Binary files differ. diff --git a/searx/static/themes/default/img/icons/icon_github.ico b/searx/static/themes/legacy/img/icons/icon_github.ico Binary files differ. diff --git a/searx/static/themes/default/img/icons/icon_google play apps.ico b/searx/static/themes/legacy/img/icons/icon_google play apps.ico Binary files differ. diff --git a/searx/static/themes/default/img/icons/icon_google play movies.ico b/searx/static/themes/legacy/img/icons/icon_google play movies.ico Binary files differ. diff --git a/searx/static/themes/default/img/icons/icon_google play music.ico b/searx/static/themes/legacy/img/icons/icon_google play music.ico Binary files differ. diff --git a/searx/static/themes/default/img/icons/icon_google.ico b/searx/static/themes/legacy/img/icons/icon_google.ico Binary files differ. diff --git a/searx/static/themes/default/img/icons/icon_kickass.ico b/searx/static/themes/legacy/img/icons/icon_kickass.ico Binary files differ. diff --git a/searx/static/themes/default/img/icons/icon_openstreetmap.ico b/searx/static/themes/legacy/img/icons/icon_openstreetmap.ico Binary files differ. diff --git a/searx/static/themes/default/img/icons/icon_searchcode code.ico b/searx/static/themes/legacy/img/icons/icon_searchcode code.ico Binary files differ. diff --git a/searx/static/themes/default/img/icons/icon_searchcode doc.ico b/searx/static/themes/legacy/img/icons/icon_searchcode doc.ico Binary files differ. diff --git a/searx/static/themes/default/img/icons/icon_searchcode.ico b/searx/static/themes/legacy/img/icons/icon_searchcode.ico Binary files differ. diff --git a/searx/static/themes/default/img/icons/icon_soundcloud.ico b/searx/static/themes/legacy/img/icons/icon_soundcloud.ico Binary files differ. diff --git a/searx/static/themes/default/img/icons/icon_stackoverflow.ico b/searx/static/themes/legacy/img/icons/icon_stackoverflow.ico Binary files differ. diff --git a/searx/static/themes/default/img/icons/icon_startpage.ico b/searx/static/themes/legacy/img/icons/icon_startpage.ico Binary files differ. diff --git a/searx/static/themes/default/img/icons/icon_subtitleseeker.ico b/searx/static/themes/legacy/img/icons/icon_subtitleseeker.ico Binary files differ. diff --git a/searx/static/themes/default/img/icons/icon_twitter.ico b/searx/static/themes/legacy/img/icons/icon_twitter.ico Binary files differ. diff --git a/searx/static/themes/default/img/icons/icon_vimeo.ico b/searx/static/themes/legacy/img/icons/icon_vimeo.ico Binary files differ. diff --git a/searx/static/themes/default/img/icons/icon_wikipedia.ico b/searx/static/themes/legacy/img/icons/icon_wikipedia.ico Binary files differ. diff --git a/searx/static/themes/default/img/icons/icon_yahoo.ico b/searx/static/themes/legacy/img/icons/icon_yahoo.ico Binary files differ. diff --git a/searx/static/themes/default/img/icons/icon_youtube.ico b/searx/static/themes/legacy/img/icons/icon_youtube.ico Binary files differ. diff --git a/searx/static/themes/default/img/preference-icon.png b/searx/static/themes/legacy/img/preference-icon.png Binary files differ. diff --git a/searx/static/themes/default/img/search-icon.png b/searx/static/themes/legacy/img/search-icon.png Binary files differ. diff --git a/searx/static/themes/default/img/searx.png b/searx/static/themes/legacy/img/searx.png Binary files differ. diff --git a/searx/static/themes/default/img/searx_logo.svg b/searx/static/themes/legacy/img/searx_logo.svg diff --git a/searx/static/themes/default/js/searx.js b/searx/static/themes/legacy/js/searx.js diff --git a/searx/static/themes/default/less/autocompleter.less b/searx/static/themes/legacy/less/autocompleter.less diff --git a/searx/static/themes/default/less/code.less b/searx/static/themes/legacy/less/code.less diff --git a/searx/static/themes/default/less/definitions.less b/searx/static/themes/legacy/less/definitions.less diff --git a/searx/static/themes/default/less/mixins.less b/searx/static/themes/legacy/less/mixins.less diff --git a/searx/static/themes/default/less/search.less b/searx/static/themes/legacy/less/search.less diff --git a/searx/static/themes/default/less/style-rtl.less b/searx/static/themes/legacy/less/style-rtl.less diff --git a/searx/static/themes/default/less/style.less b/searx/static/themes/legacy/less/style.less diff --git a/searx/templates/default/404.html b/searx/templates/default/404.html @@ -1,9 +0,0 @@ -{% extends "default/base.html" %} -{% block content %} -<div class="center"> - <h1>{{ _('Page not found') }}</h1> - {% autoescape false %} - <p>{{ _('Go to %(search_page)s.', search_page='<a href="{}">{}</a>'.decode('utf-8').format(url_for('index'), _('search page'))) }}</p> - {% endautoescape %} -</div> -{% endblock %} diff --git a/searx/templates/default/about.html b/searx/templates/default/about.html @@ -1,66 +0,0 @@ -{% extends 'default/base.html' %} -{% block content %} -{% include 'default/github_ribbon.html' %} -<div class="row"{% if rtl %} dir="ltr"{% endif %}> - <h1>About <a href="{{ url_for('index') }}">searx</a></h1> - - <p>Searx is a <a href="https://en.wikipedia.org/wiki/Metasearch_engine">metasearch engine</a>, aggregating the results of other <a href="{{ url_for('preferences') }}">search engines</a> while not storing information about its users. - </p> - <h2>Why use searx?</h2> - <ul> - <li>searx may not offer you as personalised results as Google, but it doesn't generate a profile about you</li> - <li>searx doesn't care about what you search for, never shares anything with a third party, and it can't be used to compromise you</li> - <li>searx is free software, the code is 100% open and you can help to make it better. See more on <a href="https://github.com/asciimoo/searx">github</a></li> - </ul> - <p>If you do care about privacy, want to be a conscious user, or otherwise believe - in digital freedom, make searx your default search engine or run it on your own server</p> - -<h2>Technical details - How does it work?</h2> - -<p>Searx is a <a href="https://en.wikipedia.org/wiki/Metasearch_engine">metasearch engine</a>, -inspired by the <a href="http://seeks-project.info/">seeks project</a>.<br /> -It provides basic privacy by mixing your queries with searches on other platforms without storing search data. Queries are made using a POST request on every browser (except chrome*). Therefore they show up in neither our logs, nor your url history. In case of Chrome* users there is an exception, if searx used from the search bar it performs GET requests.<br /> -Searx can be added to your browser's search bar; moreover, it can be set as the default search engine. -</p> - -<h2>How can I make it my own?</h2> - -<p>Searx appreciates your concern regarding logs, so take the <a href="https://github.com/asciimoo/searx">code</a> and run it yourself! <br />Add your Searx to this <a href="https://github.com/asciimoo/searx/wiki/Searx-instances">list</a> to help other people reclaim their privacy and make the Internet freer! -<br />The more decentralized Internet is the more freedom we have!</p> - - -<h2>More about searx</h2> - -<ul> - <li><a href="https://github.com/asciimoo/searx">github</a></li> - <li><a href="https://www.ohloh.net/p/searx/">ohloh</a></li> - <li><a href="https://twitter.com/Searx_engine">twitter</a></li> - <li>IRC: #searx @ freenode (<a href="https://kiwiirc.com/client/irc.freenode.com/searx">webclient</a>)</li> - <li><a href="https://www.transifex.com/projects/p/searx/">transifex</a></li> -</ul> - - -<hr /> - -<h2 id="faq">FAQ</h2> - -<h3>How to add to firefox?</h3> -<p><a href="#" onclick="window.external.AddSearchProvider(window.location.protocol + '//' + window.location.host + '{{ url_for('opensearch') }}');">Install</a> searx as a search engine on any version of Firefox! (javascript required)</p> - -<h2 id="dev_faq">Developer FAQ</h2> - -<h3>New engines?</h3> -<ul> - <li>Edit your <a href="https://raw.github.com/asciimoo/searx/master/searx/settings.yml">settings.yml</a></li> - <li>Create your custom engine module, check the <a href="https://github.com/asciimoo/searx/blob/master/examples/basic_engine.py">example engine</a></li> -</ul> -<p>Don't forget to restart searx after config edit!</p> - -<h3>Installation/WSGI support?</h3> -<p>See the <a href="https://github.com/asciimoo/searx/wiki/Installation">installation and setup</a> wiki page</p> - -<h3>How to debug engines?</h3> -<p><a href="{{ url_for('stats') }}">Stats page</a> contains some useful data about the engines used.</p> - -</div> -{% endblock %} diff --git a/searx/templates/default/index.html b/searx/templates/default/index.html @@ -1,18 +0,0 @@ -{% extends "default/base.html" %} -{% block content %} -<div class="center"> - <div class="title"><h1>searx</h1></div> - {% include 'default/search.html' %} - <p class="top_margin"> - {% if rtl %} - <a href="{{ url_for('preferences') }}" class="hmarg">{{ _('preferences') }}</a> - {% endif %} - <a href="{{ url_for('about') }}" class="hmarg">{{ _('about') }}</a> - {% if not rtl %} - <a href="{{ url_for('preferences') }}" class="hmarg">{{ _('preferences') }}</a> - {% endif %} - </p> -</div> -{% include 'default/github_ribbon.html' %} -{% endblock %} - diff --git a/searx/templates/default/preferences.html b/searx/templates/default/preferences.html @@ -1,129 +0,0 @@ -{% extends "default/base.html" %} -{% block head %} {% endblock %} -{% block content %} -<div class="row"> - <h2>{{ _('Preferences') }}</h2> - - <form method="post" action="{{ url_for('preferences') }}" id="search_form"> - <fieldset> - <legend>{{ _('Default categories') }}</legend> - {% set display_tooltip = false %} - {% include 'default/categories.html' %} - </fieldset> - <fieldset> - <legend>{{ _('Search language') }}</legend> - <p> - <select name='language'> - <option value="all" {% if current_language == 'all' %}selected="selected"{% endif %}>{{ _('Automatic') }}</option> - {% for lang_id,lang_name,country_name in language_codes | sort(attribute=1) %} - <option value="{{ lang_id }}" {% if lang_id == current_language %}selected="selected"{% endif %}>{{ lang_name }} ({{ country_name }}) - {{ lang_id }}</option> - {% endfor %} - </select> - </p> - </fieldset> - <fieldset> - <legend>{{ _('Interface language') }}</legend> - <p> - <select name='locale'> - {% for locale_id,locale_name in locales.items() | sort %} - <option value="{{ locale_id }}" {% if locale_id == current_locale %}selected="selected"{% endif %}>{{ locale_name }}</option> - {% endfor %} - </select> - </p> - </fieldset> - <fieldset> - <legend>{{ _('Autocomplete') }}</legend> - <p> - <select name="autocomplete"> - <option value=""> - </option> - {% for backend in autocomplete_backends %} - <option value="{{ backend }}" {% if backend == autocomplete %}selected="selected"{% endif %}>{{ backend }}</option> - {% endfor %} - </select> - </p> - </fieldset> - <fieldset> - <legend>{{ _('Image proxy') }}</legend> - <p> - <select name='image_proxy'> - <option value="1" {% if image_proxy %}selected="selected"{% endif %}>{{ _('Enabled') }}</option> - <option value="" {% if not image_proxy %}selected="selected"{% endif %}>{{ _('Disabled') }}</option> - </select> - </p> - </fieldset> - <fieldset> - <legend>{{ _('Method') }}</legend> - <p> - <select name='method'> - <option value="POST" {% if method == 'POST' %}selected="selected"{% endif %}>POST</option> - <option value="GET" {% if method == 'GET' %}selected="selected"{% endif %}>GET</option> - </select> - </p> - </fieldset> - <fieldset> - <legend>{{ _('SafeSearch') }}</legend> - <p> - <select name='safesearch'> - <option value="2" {% if safesearch == '2' %}selected="selected"{% endif %}>{{ _('Strict') }}</option> - <option value="1" {% if safesearch == '1' %}selected="selected"{% endif %}>{{ _('Moderate') }}</option> - <option value="0" {% if safesearch == '0' %}selected="selected"{% endif %}>{{ _('None') }}</option> - </select> - </p> - </fieldset> - <fieldset> - <legend>{{ _('Themes') }}</legend> - <p> - <select name="theme"> - {% for name in themes %} - <option value="{{ name }}" {% if name == theme %}selected="selected"{% endif %}>{{ name }}</option> - {% endfor %} - </select> - </p> - </fieldset> - <fieldset> - <legend>{{ _('Results on new tabs') }}</legend> - <p> - <select name='results_on_new_tab'> - <option value="1" {% if results_on_new_tab %}selected="selected"{% endif %}>{{ _('On') }}</option> - <option value="0" {% if not results_on_new_tab %}selected="selected"{% endif %}>{{ _('Off')}}</option> - </select> - </p> - </fieldset> - <fieldset> - <legend>{{ _('Currently used search engines') }}</legend> - - <table> - <tr> - <th>{{ _('Engine name') }}</th> - <th>{{ _('Category') }}</th> - <th>{{ _('Allow') }} / {{ _('Block') }}</th> - </tr> - {% for categ in all_categories %} - {% for search_engine in engines_by_category[categ] %} - - {% if not search_engine.private %} - <tr> - <td>{{ search_engine.name }} ({{ shortcuts[search_engine.name] }})&lrm;</td> - <td>{{ _(categ) }}</td> - <td class="engine_checkbox"> - <input type="checkbox" id="engine_{{ categ|replace(' ', '_') }}_{{ search_engine.name|replace(' ', '_') }}" name="engine_{{ search_engine.name }}__{{ categ }}"{% if (search_engine.name, categ) in disabled_engines %} checked="checked"{% endif %} /> - <label class="allow" for="engine_{{ categ|replace(' ', '_') }}_{{ search_engine.name|replace(' ', '_') }}">{{ _('Allow') }}</label> - <label class="deny" for="engine_{{ categ|replace(' ', '_') }}_{{ search_engine.name|replace(' ', '_') }}">{{ _('Block') }}</label> - </td> - </tr> - {% endif %} - {% endfor %} - {% endfor %} - </table> - </fieldset> - <p class="small_font">{{ _('These settings are stored in your cookies, this allows us not to store this data about you.') }} - <br /> - {{ _("These cookies serve your sole convenience, we don't use these cookies to track you.") }} - </p> - - <input type="submit" value="{{ _('save') }}" /> - <div class="{% if rtl %}left{% else %}right{% endif %} preferences_back"><a href="{{ url_for('clear_cookies') }}">{{ _('Reset defaults') }}</a></div> - <div class="{% if rtl %}left{% else %}right{% endif %} preferences_back"><a href="{{ url_for('index') }}">{{ _('back') }}</a></div> - </form> -</div> -{% endblock %} diff --git a/searx/templates/default/results.html b/searx/templates/default/results.html @@ -1,100 +0,0 @@ -{% extends "default/base.html" %} -{% block title %}{{ q }} - {% endblock %} -{% block meta %}<link rel="alternate" type="application/rss+xml" title="Searx search: {{ q }}" href="{{ url_for('index') }}?q={{ q|urlencode }}&amp;format=rss&amp;{% for category in selected_categories %}category_{{ category }}=1&amp;{% endfor %}pageno={{ pageno }}">{% endblock %} -{% block content %} -<div class="preferences_container right"><a href="{{ url_for('preferences') }}" id="preferences"><span>preferences</span></a></div> -<div class="small search center"> - {% include 'default/search.html' %} -</div> -<div id="results"> - <div id="sidebar"> - - <div id="search_url"> - {{ _('Search URL') }}: - <input type="text" value="{{ base_url }}?q={{ q|urlencode }}{% if selected_categories %}&amp;categories={{ selected_categories|join(",") | replace(' ','+') }}{% endif %}{% if pageno > 1 %}&amp;pageno={{ pageno }}{% endif %}" readonly /> - </div> - <div id="apis"> - {{ _('Download results') }} - {% for output_type in ('csv', 'json', 'rss') %} - <form method="{{ method or 'POST' }}" action="{{ url_for('index') }}"> - <div class="left"> - <input type="hidden" name="q" value="{{ q }}" /> - <input type="hidden" name="format" value="{{ output_type }}" /> - {% for category in selected_categories %} - <input type="hidden" name="category_{{ category }}" value="1"/> - {% endfor %} - <input type="hidden" name="pageno" value="{{ pageno }}" /> - <input type="submit" value="{{ output_type }}" /> - </div> - </form> - {% endfor %} - </div> - </div> - - {% if answers %} - <div id="answers"><span>{{ _('Answers') }}</span> - {% for answer in answers %} - <span>{{ answer }}</span> - {% endfor %} - </div> - {% endif %} - - {% if suggestions %} - <div id="suggestions"><span id="suggestions-title">{{ _('Suggestions') }} : </span> - {% set first = true %} - {% for suggestion in suggestions %} - {% if not first %} &bull; {% endif %}<form method="{{ method or 'POST' }}" action="{{ url_for('index') }}"> - <input type="hidden" name="q" value="{{ suggestion }}"> - <input type="submit" class="suggestion" value="{{ suggestion }}" /> - </form> - {% set first = false %} - {% endfor %} - </div> - {% endif %} - - {% if infoboxes %} - <div id="infoboxes"> - {% for infobox in infoboxes %} - {% include 'default/infobox.html' %} - {% endfor %} - </div> - {% endif %} - - {% for result in results %} - {% if result['template'] %} - {% include get_result_template('default', result['template']) %} - {% else %} - {% include 'default/result_templates/default.html' %} - {% endif %} - {% endfor %} - - {% if paging %} - <div id="pagination"> - {% if pageno > 1 %} - <form method="{{ method or 'POST' }}" action="{{ url_for('index') }}"> - <div class="{% if rtl %}right{% else %}left{% endif %}"> - <input type="hidden" name="q" value="{{ q }}" /> - {% for category in selected_categories %} - <input type="hidden" name="category_{{ category }}" value="1"/> - {% endfor %} - <input type="hidden" name="pageno" value="{{ pageno-1 }}" /> - <input type="submit" value="<< {{ _('previous page') }}" /> - </div> - </form> - {% endif %} - <form method="{{ method or 'POST' }}" action="{{ url_for('index') }}"> - <div class="{% if rtl %}left{% else %}right{% endif %}"> - {% for category in selected_categories %} - <input type="hidden" name="category_{{ category }}" value="1"/> - {% endfor %} - <input type="hidden" name="q" value="{{ q }}" /> - <input type="hidden" name="pageno" value="{{ pageno+1 }}" /> - <input type="submit" value="{{ _('next page') }} >>" /> - </div> - </form> - - <br /> - </div> - {% endif %} -</div> -{% endblock %} diff --git a/searx/templates/default/search.html b/searx/templates/default/search.html @@ -1,8 +0,0 @@ -<form method="{{ method or 'POST' }}" action="{{ url_for('index') }}" id="search_form"> - <div id="search_wrapper"> - <input type="text" placeholder="{{ _('Search for...') }}" id="q" class="q" name="q" tabindex="1" autocomplete="off" size="100" {% if q %}value="{{ q }}"{% endif %}/> - <input type="submit" value="search" id="search_submit" /> - </div> - {% set display_tooltip = true %} - {% include 'default/categories.html' %} -</form> diff --git a/searx/templates/default/stats.html b/searx/templates/default/stats.html @@ -1,22 +0,0 @@ -{% extends "default/base.html" %} -{% block head %} {% endblock %} -{% block content %} -<h2>{{ _('Engine stats') }}</h2> - -{% for stat_name,stat_category in stats %} -<div class="left"> - <table> - <tr colspan="3"> - <th>{{ stat_name }}</th> - </tr> - {% for engine in stat_category %} - <tr> - <td>{{ engine.name }}</td> - <td>{{ '%.02f'|format(engine.avg) }}</td> - <td class="percentage"><div style="width: {{ engine.percentage }}%">&nbsp;</div></td> - </tr> - {% endfor %} - </table> -</div> -{% endfor %} -{% endblock %} diff --git a/searx/templates/legacy/404.html b/searx/templates/legacy/404.html @@ -0,0 +1,9 @@ +{% extends "legacy/base.html" %} +{% block content %} +<div class="center"> + <h1>{{ _('Page not found') }}</h1> + {% autoescape false %} + <p>{{ _('Go to %(search_page)s.', search_page='<a href="{}">{}</a>'.decode('utf-8').format(url_for('index'), _('search page'))) }}</p> + {% endautoescape %} +</div> +{% endblock %} diff --git a/searx/templates/legacy/about.html b/searx/templates/legacy/about.html @@ -0,0 +1,66 @@ +{% extends 'legacy/base.html' %} +{% block content %} +{% include 'legacy/github_ribbon.html' %} +<div class="row"{% if rtl %} dir="ltr"{% endif %}> + <h1>About <a href="{{ url_for('index') }}">searx</a></h1> + + <p>Searx is a <a href="https://en.wikipedia.org/wiki/Metasearch_engine">metasearch engine</a>, aggregating the results of other <a href="{{ url_for('preferences') }}">search engines</a> while not storing information about its users. + </p> + <h2>Why use searx?</h2> + <ul> + <li>searx may not offer you as personalised results as Google, but it doesn't generate a profile about you</li> + <li>searx doesn't care about what you search for, never shares anything with a third party, and it can't be used to compromise you</li> + <li>searx is free software, the code is 100% open and you can help to make it better. See more on <a href="https://github.com/asciimoo/searx">github</a></li> + </ul> + <p>If you do care about privacy, want to be a conscious user, or otherwise believe + in digital freedom, make searx your default search engine or run it on your own server</p> + +<h2>Technical details - How does it work?</h2> + +<p>Searx is a <a href="https://en.wikipedia.org/wiki/Metasearch_engine">metasearch engine</a>, +inspired by the <a href="http://seeks-project.info/">seeks project</a>.<br /> +It provides basic privacy by mixing your queries with searches on other platforms without storing search data. Queries are made using a POST request on every browser (except chrome*). Therefore they show up in neither our logs, nor your url history. In case of Chrome* users there is an exception, if searx used from the search bar it performs GET requests.<br /> +Searx can be added to your browser's search bar; moreover, it can be set as the default search engine. +</p> + +<h2>How can I make it my own?</h2> + +<p>Searx appreciates your concern regarding logs, so take the <a href="https://github.com/asciimoo/searx">code</a> and run it yourself! <br />Add your Searx to this <a href="https://github.com/asciimoo/searx/wiki/Searx-instances">list</a> to help other people reclaim their privacy and make the Internet freer! +<br />The more decentralized Internet is the more freedom we have!</p> + + +<h2>More about searx</h2> + +<ul> + <li><a href="https://github.com/asciimoo/searx">github</a></li> + <li><a href="https://www.ohloh.net/p/searx/">ohloh</a></li> + <li><a href="https://twitter.com/Searx_engine">twitter</a></li> + <li>IRC: #searx @ freenode (<a href="https://kiwiirc.com/client/irc.freenode.com/searx">webclient</a>)</li> + <li><a href="https://www.transifex.com/projects/p/searx/">transifex</a></li> +</ul> + + +<hr /> + +<h2 id="faq">FAQ</h2> + +<h3>How to add to firefox?</h3> +<p><a href="#" onclick="window.external.AddSearchProvider(window.location.protocol + '//' + window.location.host + '{{ url_for('opensearch') }}');">Install</a> searx as a search engine on any version of Firefox! (javascript required)</p> + +<h2 id="dev_faq">Developer FAQ</h2> + +<h3>New engines?</h3> +<ul> + <li>Edit your <a href="https://raw.github.com/asciimoo/searx/master/searx/settings.yml">settings.yml</a></li> + <li>Create your custom engine module, check the <a href="https://github.com/asciimoo/searx/blob/master/examples/basic_engine.py">example engine</a></li> +</ul> +<p>Don't forget to restart searx after config edit!</p> + +<h3>Installation/WSGI support?</h3> +<p>See the <a href="https://github.com/asciimoo/searx/wiki/Installation">installation and setup</a> wiki page</p> + +<h3>How to debug engines?</h3> +<p><a href="{{ url_for('stats') }}">Stats page</a> contains some useful data about the engines used.</p> + +</div> +{% endblock %} diff --git a/searx/templates/default/base.html b/searx/templates/legacy/base.html diff --git a/searx/templates/default/categories.html b/searx/templates/legacy/categories.html diff --git a/searx/templates/default/github_ribbon.html b/searx/templates/legacy/github_ribbon.html diff --git a/searx/templates/legacy/index.html b/searx/templates/legacy/index.html @@ -0,0 +1,18 @@ +{% extends "legacy/base.html" %} +{% block content %} +<div class="center"> + <div class="title"><h1>searx</h1></div> + {% include 'legacy/search.html' %} + <p class="top_margin"> + {% if rtl %} + <a href="{{ url_for('preferences') }}" class="hmarg">{{ _('preferences') }}</a> + {% endif %} + <a href="{{ url_for('about') }}" class="hmarg">{{ _('about') }}</a> + {% if not rtl %} + <a href="{{ url_for('preferences') }}" class="hmarg">{{ _('preferences') }}</a> + {% endif %} + </p> +</div> +{% include 'legacy/github_ribbon.html' %} +{% endblock %} + diff --git a/searx/templates/default/infobox.html b/searx/templates/legacy/infobox.html diff --git a/searx/templates/default/opensearch.xml b/searx/templates/legacy/opensearch.xml diff --git a/searx/templates/default/opensearch_response_rss.xml b/searx/templates/legacy/opensearch_response_rss.xml diff --git a/searx/templates/legacy/preferences.html b/searx/templates/legacy/preferences.html @@ -0,0 +1,129 @@ +{% extends "legacy/base.html" %} +{% block head %} {% endblock %} +{% block content %} +<div class="row"> + <h2>{{ _('Preferences') }}</h2> + + <form method="post" action="{{ url_for('preferences') }}" id="search_form"> + <fieldset> + <legend>{{ _('Default categories') }}</legend> + {% set display_tooltip = false %} + {% include 'legacy/categories.html' %} + </fieldset> + <fieldset> + <legend>{{ _('Search language') }}</legend> + <p> + <select name='language'> + <option value="all" {% if current_language == 'all' %}selected="selected"{% endif %}>{{ _('Automatic') }}</option> + {% for lang_id,lang_name,country_name in language_codes | sort(attribute=1) %} + <option value="{{ lang_id }}" {% if lang_id == current_language %}selected="selected"{% endif %}>{{ lang_name }} ({{ country_name }}) - {{ lang_id }}</option> + {% endfor %} + </select> + </p> + </fieldset> + <fieldset> + <legend>{{ _('Interface language') }}</legend> + <p> + <select name='locale'> + {% for locale_id,locale_name in locales.items() | sort %} + <option value="{{ locale_id }}" {% if locale_id == current_locale %}selected="selected"{% endif %}>{{ locale_name }}</option> + {% endfor %} + </select> + </p> + </fieldset> + <fieldset> + <legend>{{ _('Autocomplete') }}</legend> + <p> + <select name="autocomplete"> + <option value=""> - </option> + {% for backend in autocomplete_backends %} + <option value="{{ backend }}" {% if backend == autocomplete %}selected="selected"{% endif %}>{{ backend }}</option> + {% endfor %} + </select> + </p> + </fieldset> + <fieldset> + <legend>{{ _('Image proxy') }}</legend> + <p> + <select name='image_proxy'> + <option value="1" {% if image_proxy %}selected="selected"{% endif %}>{{ _('Enabled') }}</option> + <option value="" {% if not image_proxy %}selected="selected"{% endif %}>{{ _('Disabled') }}</option> + </select> + </p> + </fieldset> + <fieldset> + <legend>{{ _('Method') }}</legend> + <p> + <select name='method'> + <option value="POST" {% if method == 'POST' %}selected="selected"{% endif %}>POST</option> + <option value="GET" {% if method == 'GET' %}selected="selected"{% endif %}>GET</option> + </select> + </p> + </fieldset> + <fieldset> + <legend>{{ _('SafeSearch') }}</legend> + <p> + <select name='safesearch'> + <option value="2" {% if safesearch == '2' %}selected="selected"{% endif %}>{{ _('Strict') }}</option> + <option value="1" {% if safesearch == '1' %}selected="selected"{% endif %}>{{ _('Moderate') }}</option> + <option value="0" {% if safesearch == '0' %}selected="selected"{% endif %}>{{ _('None') }}</option> + </select> + </p> + </fieldset> + <fieldset> + <legend>{{ _('Themes') }}</legend> + <p> + <select name="theme"> + {% for name in themes %} + <option value="{{ name }}" {% if name == theme %}selected="selected"{% endif %}>{{ name }}</option> + {% endfor %} + </select> + </p> + </fieldset> + <fieldset> + <legend>{{ _('Results on new tabs') }}</legend> + <p> + <select name='results_on_new_tab'> + <option value="1" {% if results_on_new_tab %}selected="selected"{% endif %}>{{ _('On') }}</option> + <option value="0" {% if not results_on_new_tab %}selected="selected"{% endif %}>{{ _('Off')}}</option> + </select> + </p> + </fieldset> + <fieldset> + <legend>{{ _('Currently used search engines') }}</legend> + + <table> + <tr> + <th>{{ _('Engine name') }}</th> + <th>{{ _('Category') }}</th> + <th>{{ _('Allow') }} / {{ _('Block') }}</th> + </tr> + {% for categ in all_categories %} + {% for search_engine in engines_by_category[categ] %} + + {% if not search_engine.private %} + <tr> + <td>{{ search_engine.name }} ({{ shortcuts[search_engine.name] }})&lrm;</td> + <td>{{ _(categ) }}</td> + <td class="engine_checkbox"> + <input type="checkbox" id="engine_{{ categ|replace(' ', '_') }}_{{ search_engine.name|replace(' ', '_') }}" name="engine_{{ search_engine.name }}__{{ categ }}"{% if (search_engine.name, categ) in disabled_engines %} checked="checked"{% endif %} /> + <label class="allow" for="engine_{{ categ|replace(' ', '_') }}_{{ search_engine.name|replace(' ', '_') }}">{{ _('Allow') }}</label> + <label class="deny" for="engine_{{ categ|replace(' ', '_') }}_{{ search_engine.name|replace(' ', '_') }}">{{ _('Block') }}</label> + </td> + </tr> + {% endif %} + {% endfor %} + {% endfor %} + </table> + </fieldset> + <p class="small_font">{{ _('These settings are stored in your cookies, this allows us not to store this data about you.') }} + <br /> + {{ _("These cookies serve your sole convenience, we don't use these cookies to track you.") }} + </p> + + <input type="submit" value="{{ _('save') }}" /> + <div class="{% if rtl %}left{% else %}right{% endif %} preferences_back"><a href="{{ url_for('clear_cookies') }}">{{ _('Reset defaults') }}</a></div> + <div class="{% if rtl %}left{% else %}right{% endif %} preferences_back"><a href="{{ url_for('index') }}">{{ _('back') }}</a></div> + </form> +</div> +{% endblock %} diff --git a/searx/templates/default/result_templates/code.html b/searx/templates/legacy/result_templates/code.html diff --git a/searx/templates/default/result_templates/default.html b/searx/templates/legacy/result_templates/default.html diff --git a/searx/templates/default/result_templates/images.html b/searx/templates/legacy/result_templates/images.html diff --git a/searx/templates/default/result_templates/map.html b/searx/templates/legacy/result_templates/map.html diff --git a/searx/templates/default/result_templates/torrent.html b/searx/templates/legacy/result_templates/torrent.html diff --git a/searx/templates/default/result_templates/videos.html b/searx/templates/legacy/result_templates/videos.html diff --git a/searx/templates/legacy/results.html b/searx/templates/legacy/results.html @@ -0,0 +1,100 @@ +{% extends "legacy/base.html" %} +{% block title %}{{ q }} - {% endblock %} +{% block meta %}<link rel="alternate" type="application/rss+xml" title="Searx search: {{ q }}" href="{{ url_for('index') }}?q={{ q|urlencode }}&amp;format=rss&amp;{% for category in selected_categories %}category_{{ category }}=1&amp;{% endfor %}pageno={{ pageno }}">{% endblock %} +{% block content %} +<div class="preferences_container right"><a href="{{ url_for('preferences') }}" id="preferences"><span>preferences</span></a></div> +<div class="small search center"> + {% include 'legacy/search.html' %} +</div> +<div id="results"> + <div id="sidebar"> + + <div id="search_url"> + {{ _('Search URL') }}: + <input type="text" value="{{ base_url }}?q={{ q|urlencode }}{% if selected_categories %}&amp;categories={{ selected_categories|join(",") | replace(' ','+') }}{% endif %}{% if pageno > 1 %}&amp;pageno={{ pageno }}{% endif %}" readonly /> + </div> + <div id="apis"> + {{ _('Download results') }} + {% for output_type in ('csv', 'json', 'rss') %} + <form method="{{ method or 'POST' }}" action="{{ url_for('index') }}"> + <div class="left"> + <input type="hidden" name="q" value="{{ q }}" /> + <input type="hidden" name="format" value="{{ output_type }}" /> + {% for category in selected_categories %} + <input type="hidden" name="category_{{ category }}" value="1"/> + {% endfor %} + <input type="hidden" name="pageno" value="{{ pageno }}" /> + <input type="submit" value="{{ output_type }}" /> + </div> + </form> + {% endfor %} + </div> + </div> + + {% if answers %} + <div id="answers"><span>{{ _('Answers') }}</span> + {% for answer in answers %} + <span>{{ answer }}</span> + {% endfor %} + </div> + {% endif %} + + {% if suggestions %} + <div id="suggestions"><span id="suggestions-title">{{ _('Suggestions') }} : </span> + {% set first = true %} + {% for suggestion in suggestions %} + {% if not first %} &bull; {% endif %}<form method="{{ method or 'POST' }}" action="{{ url_for('index') }}"> + <input type="hidden" name="q" value="{{ suggestion }}"> + <input type="submit" class="suggestion" value="{{ suggestion }}" /> + </form> + {% set first = false %} + {% endfor %} + </div> + {% endif %} + + {% if infoboxes %} + <div id="infoboxes"> + {% for infobox in infoboxes %} + {% include 'legacy/infobox.html' %} + {% endfor %} + </div> + {% endif %} + + {% for result in results %} + {% if result['template'] %} + {% include get_result_template('legacy', result['template']) %} + {% else %} + {% include 'legacy/result_templates/default.html' %} + {% endif %} + {% endfor %} + + {% if paging %} + <div id="pagination"> + {% if pageno > 1 %} + <form method="{{ method or 'POST' }}" action="{{ url_for('index') }}"> + <div class="{% if rtl %}right{% else %}left{% endif %}"> + <input type="hidden" name="q" value="{{ q }}" /> + {% for category in selected_categories %} + <input type="hidden" name="category_{{ category }}" value="1"/> + {% endfor %} + <input type="hidden" name="pageno" value="{{ pageno-1 }}" /> + <input type="submit" value="<< {{ _('previous page') }}" /> + </div> + </form> + {% endif %} + <form method="{{ method or 'POST' }}" action="{{ url_for('index') }}"> + <div class="{% if rtl %}left{% else %}right{% endif %}"> + {% for category in selected_categories %} + <input type="hidden" name="category_{{ category }}" value="1"/> + {% endfor %} + <input type="hidden" name="q" value="{{ q }}" /> + <input type="hidden" name="pageno" value="{{ pageno+1 }}" /> + <input type="submit" value="{{ _('next page') }} >>" /> + </div> + </form> + + <br /> + </div> + {% endif %} +</div> +{% endblock %} diff --git a/searx/templates/legacy/search.html b/searx/templates/legacy/search.html @@ -0,0 +1,8 @@ +<form method="{{ method or 'POST' }}" action="{{ url_for('index') }}" id="search_form"> + <div id="search_wrapper"> + <input type="text" placeholder="{{ _('Search for...') }}" id="q" class="q" name="q" tabindex="1" autocomplete="off" size="100" {% if q %}value="{{ q }}"{% endif %}/> + <input type="submit" value="search" id="search_submit" /> + </div> + {% set display_tooltip = true %} + {% include 'legacy/categories.html' %} +</form> diff --git a/searx/templates/legacy/stats.html b/searx/templates/legacy/stats.html @@ -0,0 +1,22 @@ +{% extends "legacy/base.html" %} +{% block head %} {% endblock %} +{% block content %} +<h2>{{ _('Engine stats') }}</h2> + +{% for stat_name,stat_category in stats %} +<div class="left"> + <table> + <tr colspan="3"> + <th>{{ stat_name }}</th> + </tr> + {% for engine in stat_category %} + <tr> + <td>{{ engine.name }}</td> + <td>{{ '%.02f'|format(engine.avg) }}</td> + <td class="percentage"><div style="width: {{ engine.percentage }}%">&nbsp;</div></td> + </tr> + {% endfor %} + </table> +</div> +{% endfor %} +{% endblock %} diff --git a/searx/templates/pix-art/preferences.html b/searx/templates/pix-art/preferences.html @@ -1,4 +1,4 @@ -{% extends "default/base.html" %} +{% extends "legacy/base.html" %} {% block head %} {% endblock %} {% block content %} <div class="row"> diff --git a/searx/templates/pix-art/stats.html b/searx/templates/pix-art/stats.html @@ -1,4 +1,4 @@ -{% extends "default/base.html" %} +{% extends "legacy/base.html" %} {% block head %} {% endblock %} {% block content %} <h2>{{ _('Engine stats') }}</h2> diff --git a/tests/robot/test_basic.robot b/tests/robot/test_basic.robot @@ -67,7 +67,7 @@ Change theme Page Should Contain about Page Should Contain preferences Go To http://localhost:11111/preferences - List Selection Should Be theme default + List Selection Should Be theme legacy Select From List theme oscar Submit Form id=search_form Location Should Be http://localhost:11111/ @@ -139,7 +139,7 @@ Block a plugin Page Should Contain about Page Should Contain preferences Go To http://localhost:11111/preferences - List Selection Should Be theme default + List Selection Should Be theme legacy Select From List theme oscar Submit Form id=search_form Location Should Be http://localhost:11111/ diff --git a/tests/unit/test_webapp.py b/tests/unit/test_webapp.py @@ -44,7 +44,7 @@ class ViewsTestCase(SearxTestCase): webapp.Search.search = search_mock def get_current_theme_name_mock(override=None): - return 'default' + return 'legacy' webapp.get_current_theme_name = get_current_theme_name_mock @@ -58,7 +58,7 @@ class ViewsTestCase(SearxTestCase): def test_index_html(self): result = self.app.post('/', data={'q': 'test'}) self.assertIn( - '<h3 class="result_title"><img width="14" height="14" class="favicon" src="/static/themes/default/img/icons/icon_youtube.ico" alt="youtube" /><a href="http://second.test.xyz" rel="noreferrer">Second <span class="highlight">Test</span></a></h3>', # noqa + '<h3 class="result_title"><img width="14" height="14" class="favicon" src="/static/themes/legacy/img/icons/icon_youtube.ico" alt="youtube" /><a href="http://second.test.xyz" rel="noreferrer">Second <span class="highlight">Test</span></a></h3>', # noqa result.data ) self.assertIn(