Browse Source

don't try to display the default config when the server is offline; german language update

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

13
pyweb/mumble/forms.py

@ -155,11 +155,14 @@ class MumbleServerForm( ModelForm ):
ModelForm.__init__( self, *args, **kwargs )
if self.instance and self.instance.id:
confstr = ""
conf = self.instance.defaultconf
for field in conf:
confstr += "%s: %s\n" % ( field, conf[field] )
self.fields["defaultconf"].initial = confstr
if self.instance.online:
confstr = ""
conf = self.instance.defaultconf
for field in conf:
confstr += "%s: %s\n" % ( field, conf[field] )
self.fields["defaultconf"].initial = confstr
else:
self.fields["defaultconf"].initial = _("This server is currently offline.")
class Meta:
model = MumbleServer

1
pyweb/mumble/models.py

@ -210,6 +210,7 @@ class Mumble( models.Model ):
self.ctl.stop( self.srvid );
booted = property( getBooted, setBooted, doc=ugettext_noop("Boot Server") )
online = property( getBooted, setBooted, doc=ugettext_noop("Boot Server") )
class Meta:
unique_together = ( ( 'server', 'srvid' ), );

Loading…
Cancel
Save