From a6113dc743ed16e1357e2281f7955fc7a222c6ab Mon Sep 17 00:00:00 2001 From: Michael Ziegler Date: Wed, 24 Jun 2009 23:19:33 +0200 Subject: [PATCH] default connstring for new models can now be configured in settings.py --- pyweb/mumble/models.py | 2 +- pyweb/settings.py | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/pyweb/mumble/models.py b/pyweb/mumble/models.py index a973a34..b327472 100755 --- a/pyweb/mumble/models.py +++ b/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 ); diff --git a/pyweb/settings.py b/pyweb/settings.py index b7430cd..ad3fec6 100755 --- a/pyweb/settings.py +++ b/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"