Turned comms into typeclassed objects.
This commit is contained in:
parent
39b69dcdc2
commit
851e6d00cc
28 changed files with 1000 additions and 291 deletions
21
src/comms/comms.py
Normal file
21
src/comms/comms.py
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
"""
|
||||
Default Typeclass for Comms.
|
||||
|
||||
See objects.objects for more information on Typeclassing.
|
||||
"""
|
||||
from src.typeclasses.typeclass import TypeClass
|
||||
|
||||
|
||||
class Comm(TypeClass):
|
||||
"""
|
||||
This is the base class for all Comms. Inherit from this to create different
|
||||
types of communication channels.
|
||||
"""
|
||||
def __init__(self, dbobj):
|
||||
super(Comm, self).__init__(dbobj)
|
||||
|
||||
def format_message(self, msg):
|
||||
"""
|
||||
Takes a Msg (see models.Msg), and derives the output display for it on
|
||||
the channel.
|
||||
"""
|
||||
Loading…
Add table
Add a link
Reference in a new issue