def create_channel(key, aliases=None, desc=None, locks=None, keep_log=True, typeclass=None):
 typeclass = (typeclass if typeclass else settings.BASE_CHANNEL_TYPECLASS)
 if isinstance(typeclass, basestring):
  typeclass = class_from_module(typeclass, settings.TYPECLASS_PATHS)
 new_channel = typeclass(db_key=key)
 new_channel._createdict = {'key': key, 'aliases': aliases, 'desc': desc, 'locks': locks, 'keep_log': keep_log}
 new_channel.save()
 return new_channel

def create_channel ( key , aliases = None , desc = None , locks = None , keep_log = True , typeclass = None ) : typeclass = ( typeclass if typeclass else settings . BASE_CHANNEL_TYPECLASS ) if isinstance ( typeclass , basestring ) : typeclass = class_from_module ( typeclass , settings . TYPECLASS_PATHS ) new_channel = typeclass ( db_key = key ) new_channel . _createdict = { 'key' : key , 'aliases' : aliases , 'desc' : desc , 'locks' : locks , 'keep_log' : keep_log } new_channel . save ( ) return new_channel
create a communication channel .