1 from forum.settings.base import Setting, SettingSet
2 from django.forms.widgets import Textarea
3 from forum import settings as django_settings
5 OPEN_SEARCH_SET = SettingSet('OpenSearch', 'OpenSearch', "Set up the open_search.xml file.", 3000)
7 OPEN_SEARCH_FILE = Setting('OPEN_SEARCH_FILE',
9 <?xml version="1.0" encoding="UTF-8"?>
10 <OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/">
11 <ShortName>%s Web Search</ShortName>
12 <Description>Use %s to search the Web.</Description>
14 <Url type="application/rss+xml"
15 template="%s/?q={searchTerms}&pw={startPage?}"/>
16 </OpenSearchDescription>
17 """ % (django_settings.APP_SHORT_NAME, django_settings.APP_URL, django_settings.APP_KEYWORDS, django_settings.APP_URL)),
19 dict(label = "open_search.xml file",
20 help_text = "The open_search.xml file.",
21 widget=Textarea(attrs={'rows': '20', 'cols' : '70'})))