from forum.settings.base import Setting, SettingSet from django.utils.translation import ugettext_lazy as _ LDAP_SET = SettingSet('ldap', _('LDAP settings'), _("LDAP configuration for OSQA"), 4) LDAP_SERVER = Setting('LDAP_SERVER', '', LDAP_SET, dict( label = _("LDAP Server"), help_text = _("The hostname of your organization's LDAP server"), required = False)) LDAP_USE_TLS = Setting('LDAP_USE_TLS', False, LDAP_SET, dict( label = _("Use TLS"), help_text = _("Check to use TLS"), required = False)) LDAP_BIND_DN = Setting('LDAP_BIND_DN', '', LDAP_SET, dict( label = _("DN for binding"), help_text = _("Enter the DN to use to bind to the LDAP server (leave blank for anonymous bind)"), required = False)) LDAP_BIND_SECRET = Setting('LDAP_BIND_SECRET', '', LDAP_SET, dict( label = _("Password for binding"), help_text = _("Password for binding DN above"), required = False)) LDAP_BASE_DN = Setting('LDAP_BASE_DN', '', LDAP_SET, dict( label = _("Base DN"), help_text = _("The Base DN used to search for users"), required = False)) LDAP_USER_MASK = Setting('LDAP_USER_MASK', 'UID=%s', LDAP_SET, dict(
from forum.settings.base import Setting, SettingSet from django.utils.translation import ugettext_lazy as _ API_SET = SettingSet('API', _('API settings'), _("API configuration for OSQA"), 4) API_USERNAME = Setting('API_USERNAME', 'username', API_SET, dict( label = _("Basic Auth username"), help_text = _("Username for API access"), required = True)) API_PASSWORD = Setting('API_PASSWORD', 'password', API_SET, dict( label = _("Basic Auth password"), help_text = _("Password for API access"), required = True))
import datetime from forum.settings.base import Setting, SettingSet from django.utils.translation import ugettext_lazy as _ from base import generate_installation_key STATS_SET = SettingSet('stats', _('Stats Settings'), _("OSQA Stats Settings."), 100) CHECK_FOR_UPDATES = Setting( 'CHECK_FOR_UPDATES', True, STATS_SET, dict(label="Check for updates", help_text=_(""" Use the OSQA stats server recieve notifications about the latest updates. """), required=False)) SITE_KEY = Setting('SITE_KEY', generate_installation_key()) UPDATE_MESSAGES_XML = Setting('UPDATE_MESSAGES_XML', '') LATEST_UPDATE_DATETIME = Setting('LATEST_UPDATES_DATETIME', datetime.datetime.now()) # Update server. Do not edit. UPDATE_SERVER_URL = 'https://updater.osqa.net'
from forum.settings.base import Setting MYSQL_FTS_INSTALLED = Setting('MYSQL_FTS_INSTALLED', True) MYSQL_FTS_VERSION = Setting('MYSQL_FTS_VERSION', 1)
from forum.settings.base import Setting, SettingSet from django.forms.widgets import Textarea from django.core.urlresolvers import reverse from forum.settings import APP_URL from django.utils.translation import ugettext_lazy as _ ROBOTS_SET = SettingSet('robots', _('Robots txt'), _("Set up the robots.txt file."), 3000) ROBOTS_FILE = Setting( 'ROBOTS_FILE', """Sitemap: %s/sitemap.xml User-Agent: * Disallow: /accounts/ Disallow: /users/ Disallow: /revisions/ Disallow: /search Disallow: /matching_tags Disallow: /*sort= """ % APP_URL, ROBOTS_SET, dict(label=_("Robots.txt file"), help_text=_(""" The robots.txt file search engine spiders will see. """), widget=Textarea(attrs={'rows': '20'})))
FUND_METRICS_TEMPLATE = Setting( 'FUND_%d_METRICS_TEMPLATE' % (fund.pk), """ <div class="fund_metrics-container"> <div class="metrics-contentinner"> <div class="metric"> <article> <div class="metric-text"> <p>Number of new Investments</p> </div> <div class="metric-amount1 metric-resize">17</div> </article> </div> <div class="metric"> <article> <div class="metric-amount2 metric-resize">$62,205</div> <div class="metric-text2"> <p>New Asset Inflows</p> </div> </article> </div> <div class="metric"> <article> <div class="metric-amount2 metric-resize">$32,603</div> <div class="metric-text2"> <p>Number of Participants</p> </div> </article> </div> <div class="metric"> <article> <div class="metric-text"> <p>Number of new Investments</p> </div> <div class="metric-amount1 no_change metric-resize">00</div> </article> </div> </div> <div class="fundbtn"><a href="#" class="btn disabled" id="dashbtn_fix">Detailed View</a></div> </div> """, MAGNATE_FUNDS, dict(label="Template for statistics for %s" % (fund.name), help_text=""" Template for statistics for %s """ % (fund.name), widget=Textarea(attrs={'rows': '20'})))
from forum.settings.base import Setting, SettingSet from django.forms.widgets import Textarea from django.core.urlresolvers import reverse from forum.settings import APP_URL SLACKBOT_SET = SettingSet('slackbot', 'Slack bot', "Set up slack bot.", 3000) SLACK_HOOK = Setting( 'SLACK_HOOK', "", SLACKBOT_SET, dict(label="Slack webhook URL", help_text=""" Enter slack incomming webhook URL. """))
import os from django.conf import settings as djsettings from forum.settings.base import Setting, SettingSet from django.utils.translation import ugettext_lazy as _ EXPORTER_SET = SettingSet('exporter', _('Exporter settings'), _("Data export settings"), 800) EXPORTER_BACKUP_STORAGE = Setting( 'EXPORTER_BACKUP_STORAGE', os.path.join(os.path.dirname(__file__), 'backups'), EXPORTER_SET, dict(label=_("Backups storage"), help_text=_("A folder to keep your backups organized."))) MERGE_MAPPINGS = Setting('MERGE_MAPPINGS', {})
from forum.settings import EXT_KEYS_SET from forum.settings.base import Setting TWITTER_CONSUMER_KEY = Setting( 'TWITTER_CONSUMER_KEY', '', EXT_KEYS_SET, dict(label="Twitter consumer key", help_text=""" Get this key at the <a href="http://twitter.com/apps/">Twitter apps</a> to enable authentication in your site through Twitter. """, required=False)) TWITTER_CONSUMER_SECRET = Setting( 'TWITTER_CONSUMER_SECRET', '', EXT_KEYS_SET, dict(label="Twitter consumer secret", help_text=""" This your Twitter consumer secret that you'll get in the same place as the consumer key. """, required=False))
from forum.settings import EXT_KEYS_SET from forum.settings.base import Setting from django.utils.translation import ugettext_lazy as _ TWITTER_CONSUMER_KEY = Setting( 'TWITTER_CONSUMER_KEY', '', EXT_KEYS_SET, dict(label=_("Twitter consumer key"), help_text=_(""" Get this key at the <a href="http://twitter.com/apps/">Twitter apps</a> to enable authentication in your site through Twitter. """), required=False)) TWITTER_CONSUMER_SECRET = Setting( 'TWITTER_CONSUMER_SECRET', '', EXT_KEYS_SET, dict(label=_("Twitter consumer secret"), help_text=_(""" This your Twitter consumer secret that you'll get in the same place as the consumer key. """), required=False)) TWITTER_AUTO_CALLBACK_REDIRECT = Setting( 'TWITTER_AUTO_CALLBACK_REDIRECT', True, EXT_KEYS_SET, dict(label=_("Twitter auto-callback redirect"), help_text=_(""" Automatically redirect to the Twitter authentication done page, pass the oauth_callback parameter. """), required=False))
from forum.settings.base import Setting from forum.settings.extkeys import EXT_KEYS_SET from forum.settings.minrep import MIN_REP_SET from django.utils.translation import ugettext_lazy as _ WORDPRESS_API_KEY = Setting( 'WORDPRESS_API_KEY', '', EXT_KEYS_SET, dict( label=_("WordPress API key"), help_text= _("Your WordPress API key. You can get one at <a href='http://wordpress.com/'>http://wordpress.com/</a>" ), required=False)) REP_FOR_NO_SPAM_CHECK = Setting( 'REP_FOR_NO_SPAM_CHECK', 750, MIN_REP_SET, dict( label=_("Minimum reputation to not have your posts checked"), help_text= _("The minimum reputation a user must have so that when they post a question, answer or comment it is not checked for spam." )))
from forum.settings.base import Setting, SettingSet from django.forms.widgets import Select from django.utils.translation import ugettext_lazy as _ CAS_PROTOCOL_CHOICES = (('cas1', _('CAS 1.0')), ('cas2', _('CAS 2.0')), ('cas3', _('CAS 3.0'))) CAS_SET = SettingSet('cas', _('CAS settings'), _("CAS configuration for OSQA"), 4) CAS_SERVER_URL = Setting( 'CAS_SERVER_URL', '', CAS_SET, dict( label=_("CAS Server URL"), help_text= _("The URL of the CAS server to use for authentication, e.g. https://cas.example.org or https://example.org/cas/" ), required=False)) CAS_PROTOCOL = Setting( 'CAS_PROTOCOL', 'cas3', CAS_SET, dict( label=_("CAS Protocol"), help_text= _("The CAS server protocol to use for ticket validation. Only CAS 3.0 supports attributes." ), widget=Select(choices=CAS_PROTOCOL_CHOICES), required=False)) CAS_ATTRIBUTE_NAME = Setting( 'CAS_ATTRIBUTE_NAME', 'displayName', CAS_SET,
from forum.settings.base import Setting MYSQL_FTS_INSTALLED = Setting('MYSQL_FTS_INSTALLED', False)
from forum.settings.base import Setting, SettingSet from django.forms.widgets import Textarea ROBOTS_SET = SettingSet('robots', 'Robots txt', "Set up the robots.txt file.", 3000) ROBOTS_FILE = Setting( 'ROBOTS_FILE', """ User-Agent: * Disallow: /accounts/ Disallow: /users/ """, ROBOTS_SET, dict(label="Robots.txt file", help_text=""" The robots.txt file search engine spiders will see. """, widget=Textarea(attrs={'rows': '20'})))
from forum.settings import BADGES_SET from forum.settings.base import Setting from django.utils.translation import ugettext_lazy as _ POPULAR_QUESTION_VIEWS = Setting( 'POPULAR_QUESTION_VIEWS', 1000, BADGES_SET, dict(label=_("Popular Question views"), help_text=_(""" Number of question views required to award a Popular Question badge to the question author """))) NOTABLE_QUESTION_VIEWS = Setting( 'NOTABLE_QUESTION_VIEWS', 2500, BADGES_SET, dict(label=_("Notable Question views"), help_text=_(""" Number of question views required to award a Notable Question badge to the question author """))) FAMOUS_QUESTION_VIEWS = Setting( 'FAMOUS_QUESTION_VIEWS', 10000, BADGES_SET, dict(label=_("Famous Question views"), help_text=_(""" Number of question views required to award a Famous Question badge to the question author """))) NICE_ANSWER_VOTES_UP = Setting( 'NICE_ANSWER_VOTES_UP', 10, BADGES_SET, dict(label=_("Nice Answer up votes"), help_text=_(""" Number of up votes required to award a Nice Answer badge to the answer author """)))
from forum.settings import EXT_KEYS_SET from forum.settings.base import Setting RECAPTCHA_PUB_KEY = Setting('RECAPTCHA_PUB_KEY', '', EXT_KEYS_SET, dict( label = "Recaptch public key", help_text = """ Get this key at <a href="http://recaptcha.net">reCaptcha</a> to enable recaptcha anti spam through. """, required=False)) RECAPTCHA_PRIV_KEY = Setting('RECAPTCHA_PRIV_KEY', '', EXT_KEYS_SET, dict( label = "Recaptch private key", help_text = """ This is the private key you'll get in the same place as the recaptcha public key. """, required=False))
from forum.settings import EXT_KEYS_SET from forum.settings.base import Setting from django.utils.translation import ugettext_lazy as _ FB_API_KEY = Setting( 'FB_API_KEY', '', EXT_KEYS_SET, dict(label=_("Facebook API key"), help_text=_(""" Get this key at the <a href="http://www.facebook.com/developers/">Facebook developers network</a> to enable authentication in your site through facebook. """), required=False)) FB_APP_SECRET = Setting( 'FB_APP_SECRET', '', EXT_KEYS_SET, dict(label=_("Facebook APP secret"), help_text=_(""" This your facebook app secret that you'll get in the same place as the API key. """), required=False))
from forum.settings import BADGES_SET from forum.settings.base import Setting BUG_BUSTER_VOTES_UP = Setting('BUG_BUSTER_VOTES_UP', 3, BADGES_SET, dict( label = "Bug Buster Votes Up", help_text = """ Number of votes up required for the author of a question tagged as bug to be awarded the Bug Buster badge. """))
from forum.settings.base import Setting PG_FTSTRIGGERS_VERSION = Setting('PG_FTSTRIGGERS_VERSION', 0)
from forum.settings import BADGES_SET from forum.settings.base import Setting from django.utils.translation import ugettext_lazy as _ NICE_ANSWER_VOTES_UP = Setting( 'NICE_ANSWER_VOTES_UP', 10, BADGES_SET, dict(label=_("Nice Answer up votes"), help_text=_(""" Number of up votes required to award a Nice Answer badge to the answer author """))) NICE_QUESTION_VOTES_UP = Setting( 'NICE_QUESTION_VOTES_UP', 10, BADGES_SET, dict(label=_("Nice Question up votes"), help_text=_(""" Number of up votes required to award a Nice Question badge to the question author """))) GOOD_ANSWER_VOTES_UP = Setting( 'GOOD_ANSWER_VOTES_UP', 25, BADGES_SET, dict(label=_("Good Answer up votes"), help_text=_(""" Number of up votes required to award a Good Answer badge to the answer author """))) GOOD_QUESTION_VOTES_UP = Setting( 'GOOD_QUESTION_VOTES_UP', 25, BADGES_SET, dict(label=_("Good Question up votes"), help_text=_(""" Number of up votes required to award a Good Question badge to the question author """)))