There are a number of utilities or "presentation" functions, that would be much more at home attached to a model.
For example, coda_replication.presentation.xmlToQueueEntry would be more appropriate as a converter constructor on the QueueEntry model...
class QueueEntry(models.Model):
# ...
@classmethod
def from_xml(self, xml):
# xmlToQueueEntry body here.
Of course, not all of the functions will work like this. An xml -> object function that just updates an object might be more appropriately attached as an instance method.
There are a number of utilities or "presentation" functions, that would be much more at home attached to a model.
For example,
coda_replication.presentation.xmlToQueueEntrywould be more appropriate as a converter constructor on theQueueEntrymodel...Of course, not all of the functions will work like this. An
xml -> objectfunction that just updates an object might be more appropriately attached as an instance method.