Browse Source

rename some config properties according to their variable names in murmur

Natenom/support-murmur-13-1446181288462
Michael Ziegler 12 years ago
parent
commit
ba31d7da6c
  1. 15
      pyweb/mumble/forms.py
  2. 23
      pyweb/mumble/models.py

15
pyweb/mumble/forms.py

@ -114,15 +114,16 @@ class MumbleForm( PropertyModelForm ):
channel = forms.CharField( required=False )
defchan = forms.TypedChoiceField( choices=(), coerce=int, required=False )
timeout = forms.IntegerField( required=False )
certreq = forms.BooleanField( required=False )
textlen = forms.IntegerField( required=False )
html = forms.BooleanField( required=False )
rememchn= forms.BooleanField( required=False, help_text=_(
certrequired = forms.BooleanField( required=False )
textmessagelength = forms.IntegerField( required=False )
allowhtml = forms.BooleanField( required=False )
rememberchannel = forms.BooleanField( required=False, help_text=_(
"Remember the channel users were in when they quit, and automatically move them to "
"that channel when they join.") )
sgversion= forms.CharField( required=False )
sgpositional = forms.BooleanField( required=False )
sgptt = forms.BooleanField( required=False )
suggestversion = forms.CharField( required=False )
suggestpositional = forms.BooleanField( required=False )
suggestpushtotalk = forms.BooleanField( required=False )
def __init__( self, *args, **kwargs ):
PropertyModelForm.__init__( self, *args, **kwargs )

23
pyweb/mumble/models.py

@ -290,17 +290,18 @@ class Mumble( models.Model ):
channel = mk_config_property( "channelname", ugettext_noop("Channel name regex") )
defchan = mk_config_property( "defaultchannel", ugettext_noop("Default channel"), get_coerce=int )
timeout = mk_config_property( "timeout", ugettext_noop("Timeout"), get_coerce=int )
textlen = mk_config_property( "textmessagelength", ugettext_noop("Maximum length of text messages") )
usersperchannel = mk_config_property( "usersperchannel",ugettext_noop("Users per channel"), get_coerce=int )
sgversion = mk_config_property( "suggestversion", ugettext_noop("Version to recommend") )
certreq = mk_config_bool_property( "certrequired", ugettext_noop("Require Certificate") )
html = mk_config_bool_property( "allowhtml", ugettext_noop("Allow HTML to be used in messages") )
bonjour = mk_config_bool_property( "bonjour", ugettext_noop("Publish this server via Bonjour") )
autoboot= mk_config_bool_property( "boot", ugettext_noop("Boot Server when Murmur starts") )
rememchn= mk_config_bool_property( "rememberchannel", ugettext_noop("Remember last channel") )
sgpositional= mk_config_bool_property( "suggestpositional", ugettext_noop("Suggest to use positional audio") )
sgptt = mk_config_bool_property( "suggestpushtotalk", ugettext_noop("Suggest to use Push-To-Talk") )
textmessagelength = mk_config_property( "textmessagelength", ugettext_noop("Maximum length of text messages") )
usersperchannel = mk_config_property( "usersperchannel", ugettext_noop("Users per channel"), get_coerce=int )
suggestversion = mk_config_property( "suggestversion", ugettext_noop("Version to recommend") )
certrequired = mk_config_bool_property( "certrequired", ugettext_noop("Require Certificate") )
allowhtml = mk_config_bool_property( "allowhtml", ugettext_noop("Allow HTML to be used in messages") )
bonjour = mk_config_bool_property( "bonjour", ugettext_noop("Publish this server via Bonjour") )
autoboot = mk_config_bool_property( "boot", ugettext_noop("Boot Server when Murmur starts") )
rememberchannel = mk_config_bool_property( "rememberchannel", ugettext_noop("Remember last channel") )
suggestpositional = mk_config_bool_property( "suggestpositional", ugettext_noop("Suggest to use positional audio") )
suggestpushtotalk = mk_config_bool_property( "suggestpushtotalk", ugettext_noop("Suggest to use Push-To-Talk") )
def get_absolute_url( self ):
from views import show

Loading…
Cancel
Save