mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-01-21 07:55:00 +00:00
Tests: - Functional tests work - Initial setup works - UWSGI configuration is created and daemon is running. - Enabling and disabling public access works. Public access file is created/removed. App page shows current value. If exception is raised, error is shown properly. - Setting safe search to all three values works. Configuration file is updated properly. App page shows current value properly. If exception is raised, error is shown properly. Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org> Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
20 lines
668 B
Python
20 lines
668 B
Python
# SPDX-License-Identifier: AGPL-3.0-or-later
|
|
"""Django form for configuring Searx."""
|
|
|
|
from django import forms
|
|
from django.utils.translation import gettext_lazy as _
|
|
|
|
|
|
class SearxForm(forms.Form):
|
|
"""Searx configuration form."""
|
|
|
|
safe_search = forms.ChoiceField(
|
|
label=_('Safe Search'), help_text=_(
|
|
'Select the default family filter to apply to your search results.'
|
|
), choices=((0, _('None')), (1, _('Moderate')), (2, _('Strict'))))
|
|
|
|
public_access = forms.BooleanField(
|
|
label=_('Allow Public Access'), help_text=_(
|
|
'Allow this application to be used by anyone who can reach it.'),
|
|
required=False)
|