From f5852778520c7ed6fe4ecfea0837d77534901b29 Mon Sep 17 00:00:00 2001 From: Michael Ziegler Date: Mon, 18 May 2009 23:54:37 +0200 Subject: [PATCH 1/2] added hint about image size --- pyweb/mumble/urls.py | 6 +++--- template/mumble/mumble.htm | 2 ++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/pyweb/mumble/urls.py b/pyweb/mumble/urls.py index d18fb4e..632db00 100644 --- a/pyweb/mumble/urls.py +++ b/pyweb/mumble/urls.py @@ -18,7 +18,7 @@ from django.conf.urls.defaults import * urlpatterns = patterns( 'mumble.views', - ( r'(?P\d+)/texture.jpg', 'showTexture' ), - ( r'(?P\d+)', 'show' ), - ( r'$', 'mumbles' ), + ( r'(?P\d+)/texture.jpg', 'showTexture' ), + ( r'(?P\d+)', 'show' ), + ( r'$', 'mumbles' ), ) diff --git a/template/mumble/mumble.htm b/template/mumble/mumble.htm index 9c3c7c2..90dec4d 100644 --- a/template/mumble/mumble.htm +++ b/template/mumble/mumble.htm @@ -44,6 +44,8 @@ You can upload an image that you would like to use as your user texture here.
Your current texture is:
user texture
+ Hint: The texture image needs to be 600x60 in size. If you upload an image with + a different size, it will be resized accordingly.

From 76d66448fcddc9b2431788e64c5211e24123d89b Mon Sep 17 00:00:00 2001 From: Michael Ziegler Date: Tue, 19 May 2009 18:20:18 +0200 Subject: [PATCH 2/2] prevented "server" field on MumbleUser model from being changed once the record has been entered into the database (and hence into murmur). fixes #2 --- pyweb/mumble/models.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/pyweb/mumble/models.py b/pyweb/mumble/models.py index e0fd2e8..7a55a25 100644 --- a/pyweb/mumble/models.py +++ b/pyweb/mumble/models.py @@ -271,8 +271,13 @@ class MumbleUser( models.Model ): # Unregister this player in Murmur via dbus. murmur = self.server.getDbusObject(); murmur.unregisterPlayer( dbus.Int32( self.mumbleid ) ); - - + + def __setattr__( self, name, value ): + if name == 'server': + if self.id is not None and self.server != value: + raise AttributeError( "This field must not be updated once the Record has been saved." ); + + models.Model.__setattr__( self, name, value ); from django.db.models import signals