Extension templates

Registered by Stas Shtin

Add value entries for extensions.

Blueprint information

Status:
Complete
Approver:
None
Priority:
Undefined
Drafter:
None
Direction:
Needs approval
Assignee:
Dreamtime
Definition:
Approved
Series goal:
Accepted for trunk
Implementation:
Implemented
Milestone target:
milestone icon 0.9.0
Started by
Stas Shtin
Completed by
Stas Shtin

Related branches

Sprints

Whiteboard

class ActionTemplate(models.Model):
    name = models.CharField(100)
    description = models.TextField(blank=True)
    xml_template = models.TextField()

class ActionVariable(models.Model):
    TYPE_CHOICES = ((0, 'Selection'), (1, 'Prompt'))
    SELECTION_CHOICES = ((0, 'Local endpoint'), (1, 'Gateway'), (2, 'Audio file')) # etc..
    FIELD_CHOICES = ((0, 'String'), (1, 'Integer'), (2, 'IP'), (3, 'Host')) # etc...

    template = models.ForeignKey(ActionTemplate)
    name = models.CharField(100, blank=True)
    variable_type = models.IntegerField(choices=TYPE_CHOICES)
    kind = models.IntegerField(blank=True, null=True)
    default = models.CharField(blank=True, null=True)

    class Meta:
        unique_together = (('template', 'name'),)

class Extension(models.Model):
    owner = models.ForeignKey(User)
    name = models.CharField(100)

class Action(models.Model):
    template = models.ForeignKey(ActionTemplate)
    order = models.PositiveIntegerField()

    class Meta:
        unique_together = (('template', 'order'),)

class ActionData(models.Model):
    action = models.ForeignKey(Action)
    variable = models.ForeignKey(ActionVariable)
    value = models.CharField(100)

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.

Subscribers

No subscribers.