#4604: Message Passing For Anonymous Users
-------------------------------------------------------+--------------------
   Reporter:  Sean Patrick Hogan <[EMAIL PROTECTED]>  |                Owner:  
nobody                
     Status:  new                                      |            Component:  
Contrib apps          
    Version:  SVN                                      |           Resolution:  
                      
   Keywords:                                           |                Stage:  
Design decision needed
  Has_patch:  1                                        |           Needs_docs:  
0                     
Needs_tests:  0                                        |   Needs_better_patch:  
1                     
-------------------------------------------------------+--------------------
Comment (by Thomas Güttler <[EMAIL PROTECTED]>):

 I think it would be nice to have a loglevel.
 {{{
 KNOWN_LOGLEVELS=["info", "error"]

 class Message(object):
     def __init__(self, message, loglevel="info"):
         self.message=message
         assert loglevel in KNOWN_LOGLEVEL
         self.loglevel=loglevel
     def __unicode__(self):
         return self.message

 def create_message(self, message, loglevel="info"):
     ...
     messages.append(Message(message, loglevel))
     ...
 }}}

-- 
Ticket URL: <http://code.djangoproject.com/ticket/4604#comment:18>
Django Code <http://code.djangoproject.com/>
The web framework for perfectionists with deadlines
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to