Browse Source

default connstring for new models can now be configured in settings.py

Natenom/support-murmur-13-1446181288462
Michael Ziegler 16 years ago
parent
commit
a6113dc743
  1. 2
      pyweb/mumble/models.py
  2. 6
      pyweb/settings.py

2
pyweb/mumble/models.py

@ -30,7 +30,7 @@ from mctl import *
class Mumble( models.Model ):
name = models.CharField( 'Server Name', max_length = 200 );
dbus = models.CharField( 'DBus or ICE base', max_length = 200, default = 'Meta:tcp -h 127.0.0.1 -p 6502' );
dbus = models.CharField( 'DBus or ICE base', max_length = 200, default = settings.DEFAULT_CONN );
srvid = models.IntegerField( 'Server ID', editable = False );
addr = models.CharField( 'Server Address', max_length = 200 );
port = models.IntegerField( 'Server Port', blank = True, null = True );

6
pyweb/settings.py

@ -56,6 +56,12 @@ SLICE_VERSION = (1, 1, 8)
SLICE = None
# The default connection string to set for newly created instances.
# ICE:
#DEFAULT_CONN = 'Meta:tcp -h 127.0.0.1 -p 6502'
# DBus:
DEFAULT_CONN = 'net.sourceforge.mumble.murmur'
# Default email address to send mails from.
DEFAULT_FROM_EMAIL = "webmaster@localhost"

Loading…
Cancel
Save