Index: django/contrib/auth/models.py
===================================================================
--- django/contrib/auth/models.py	(revision 11204)
+++ django/contrib/auth/models.py	(working copy)
@@ -261,7 +261,7 @@
     def get_and_delete_messages(self):
         messages = []
         for m in self.message_set.all():
-            messages.append(m.message)
+            messages.append(m)
             m.delete()
         return messages
 
@@ -293,12 +293,14 @@
     The message system is a lightweight way to queue messages for given
     users. A message is associated with a User instance (so it is only
     applicable for registered users). There's no concept of expiration or
-    timestamps. Messages are created by the Django admin after successful
-    actions. For example, "The poll Foo was created successfully." is a
-    message.
+    timestamps. A message consists of the actual message text and an optional
+    30 characters or fewer category string. Messages are created by the Django
+    admin after successful actions. For example, "The poll Foo was created
+    successfully." is a message.
     """
     user = models.ForeignKey(User)
     message = models.TextField(_('message'))
+    category = models.CharField(_('category'), max_length=30, blank=True)
 
     def __unicode__(self):
         return self.message
Index: django/contrib/auth/management/__init__.py
===================================================================
--- django/contrib/auth/management/__init__.py	(revision 11204)
+++ django/contrib/auth/management/__init__.py	(working copy)
@@ -4,6 +4,7 @@
 
 from django.db.models import get_models, signals
 from django.contrib.auth import models as auth_app
+from django.contrib.auth.models import Message
 
 def _get_permission_codename(action, opts):
     return u'%s_%s' % (action, opts.object_name.lower())
@@ -44,7 +45,19 @@
                 call_command("createsuperuser", interactive=True)
             break
 
+def add_category_field(app, created_models, verbosity, **kwargs):
+    from django.db import connection
+    cursor = connection.cursor()
+    data_type = connection.creation.data_types['CharField'] % {'max_length': 30}
+    alter = 'ALTER TABLE %s ADD COLUMN `category` %s NOT NULL;' % (Message._meta.db_table, data_type)
+    try:
+        cursor.execute(alter)
+    except:
+        # column may already exist
+        pass
+
 signals.post_syncdb.connect(create_permissions,
     dispatch_uid = "django.contrib.auth.management.create_permissions")
 signals.post_syncdb.connect(create_superuser,
     sender=auth_app, dispatch_uid = "django.contrib.auth.management.create_superuser")
+signals.post_syncdb.connect(add_category_field, sender=auth_app)
Index: docs/topics/auth.txt
===================================================================
--- docs/topics/auth.txt	(revision 11204)
+++ docs/topics/auth.txt	(working copy)
@@ -1278,7 +1278,8 @@
 The message system is a lightweight way to queue messages for given users.
 
 A message is associated with a :class:`~django.contrib.auth.models.User`.
-There's no concept of expiration or timestamps.
+There's no concept of expiration or timestamps. A message consists of the actual
+``message`` text and an optional 30 characters or fewer ``category`` string.
 
 Messages are used by the Django admin after successful actions. For example,
 ``"The poll Foo was created successfully."`` is a message.
@@ -1288,7 +1289,8 @@
 .. method:: models.User.message_set.create(message)
 
     To create a new message, use
-    ``user_obj.message_set.create(message='message_text')``.
+    ``user_obj.message_set.create(message='message_text', 
+    category='message_category')``. )``.
 
     To retrieve/delete messages, use
     :meth:`user_obj.get_and_delete_messages() <django.contrib.auth.models.User.get_and_delete_messages>`,
@@ -1301,7 +1303,8 @@
     def create_playlist(request, songs):
         # Create the playlist with the given songs.
         # ...
-        request.user.message_set.create(message="Your playlist was added successfully.")
+        request.user.message_set.create(message="Your playlist was added successfully.",
+            category="information")
         return render_to_response("playlists/create.html",
             context_instance=RequestContext(request))
 
@@ -1315,7 +1318,7 @@
     {% if messages %}
     <ul>
         {% for message in messages %}
-        <li>{{ message }}</li>
+        <li class="{{ message.category }}">{{ message }}</li>
         {% endfor %}
     </ul>
     {% endif %}
Index: tests/regressiontests/auth_backends/tests.py
===================================================================
--- tests/regressiontests/auth_backends/tests.py	(revision 11204)
+++ tests/regressiontests/auth_backends/tests.py	(working copy)
@@ -75,4 +75,16 @@
 False
 >>> user.has_perms(['auth.test2', 'auth.test3'])
 False
+
+>>> user = User.objects.create_user('test2', 'test2@example.com', 'test')
+>>> message = user.message_set.create(message="uncategorized message")
+>>> messages = user.get_and_delete_messages()
+>>> messages[0]
+<Message: uncategorized message>
+>>> messages[0].category
+u''
+>>> message = user.message_set.create(message="Categorized message", category="test")
+>>> messages = user.get_and_delete_messages()
+>>> messages[0].category
+u'test'
 """}
