diff options
-rw-r--r-- | askbot/conf/login_providers.py | 20 | ||||
-rw-r--r-- | askbot/deps/livesettings/values.py | 10 |
2 files changed, 29 insertions, 1 deletions
diff --git a/askbot/conf/login_providers.py b/askbot/conf/login_providers.py index 56423ca4..50597f62 100644 --- a/askbot/conf/login_providers.py +++ b/askbot/conf/login_providers.py @@ -29,6 +29,26 @@ settings.register( ) ) +settings.register( + livesettings.BooleanValue( + LOGIN_PROVIDERS, + 'WORDPRESS_SITE_LOGIN', + default = False, + description=_('Activate to allow login with self-hosted wordpress site'), + help_text=_('to activate this feature you must fill out the wordpress xml-rpc setting bellow') + ) +) + +settings.register( + livesettings.URLValue( + LOGIN_PROVIDERS, + 'WORDPRESS_SITE_URL', + default = '', + description=_('Fill it with the wordpress url to the xml-rpc, normally http://mysite.com/xmlrpc.php'), + help_text=_('To enable, go to Settings->Writing->Remote Publishing and check the box for XML-RPC') + ) +) + providers = ( 'local', 'AOL', diff --git a/askbot/deps/livesettings/values.py b/askbot/deps/livesettings/values.py index 740d9884..6372e656 100644 --- a/askbot/deps/livesettings/values.py +++ b/askbot/deps/livesettings/values.py @@ -21,7 +21,7 @@ import os __all__ = ['BASE_GROUP', 'ConfigurationGroup', 'Value', 'BooleanValue', 'DecimalValue', 'DurationValue', 'FloatValue', 'IntegerValue', 'ModuleValue', 'PercentValue', 'PositiveIntegerValue', 'SortedDotDict', - 'StringValue', 'ImageValue', 'LongStringValue', 'MultipleStringValue'] + 'StringValue', 'ImageValue', 'LongStringValue', 'MultipleStringValue', 'URLValue'] _WARN = {} @@ -545,6 +545,14 @@ class StringValue(Value): to_editor = to_python +class URLValue(Value): + + class field(forms.URLField): + + def __init__(self, *args, **kwargs): + kwargs['required'] = False + forms.URLField.__init__(self, *args, **kwargs) + class LongStringValue(Value): class field(forms.CharField): |