Skip to content

Attach XML/Object Utils to Models #79

Description

@damonkelley

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions