From cef5c02d25f7ac7de3ebc108f54c0f721035a624 Mon Sep 17 00:00:00 2001 From: yomguy Date: Fri, 13 Apr 2012 03:25:26 +0200 Subject: [PATCH] cleanup --- jqchat/admin.py | 2 +- jqchat/models.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/jqchat/admin.py b/jqchat/admin.py index 2d12e1a..7564c50 100644 --- a/jqchat/admin.py +++ b/jqchat/admin.py @@ -6,7 +6,7 @@ from django.contrib import admin class RoomAdmin(admin.ModelAdmin): list_display = ('name', 'created', 'last_activity_formatted', 'description', 'description_modified') readonly_fields = ('created', 'description_modified', 'content_type', 'object_id') - # As we've set some fields to be read-only, they will automatically appear at the end + # As we've set some fields to be read-only, they will automatically appear at the end # of the list. Manually order the fields to be as they are defined in the model. fieldsets = ( (None, { diff --git a/jqchat/models.py b/jqchat/models.py index bc020ca..1299eda 100644 --- a/jqchat/models.py +++ b/jqchat/models.py @@ -87,7 +87,7 @@ except: (3, "has left the room."), ) class messageManager(models.Manager): - + def create_message(self, user, room, msg): """Create a message for the given user.""" m = Message.objects.create(user=user, @@ -111,10 +111,10 @@ class Message(models.Model): - a text typed in by the user. - an event carried out in the room ("user X has left the room."). - New messages should be created through the supplied manager methods, as all + New messages should be created through the supplied manager methods, as all messages get preformatted (added markup) for display in the chat window. For example: - + Messages: >>> user = User.objects.create_user('john', 'lennon@thebeatles.com', 'johnpassword') >>> room = Room.objects.create(name='Test room') -- 2.39.5