View and some validation logic for database config

* Fixing some bugs in the manifest definition
* Database model and schema migration for tower settings
* Initial View and Serializer implementation using a strategy of merging
  model instances and named tuples
This commit is contained in:
Matthew Jones
2015-12-11 16:57:11 -05:00
parent fdcda43de6
commit f53f3d805d
8 changed files with 600 additions and 14 deletions

View File

@@ -6,19 +6,22 @@
# Django
from django.conf import settings
from django.db import models
from django.utils.translation import ugettext_lazy as _
# Tower
from awx.main.models.base import CreatedModifiedModel
class TowerSettings(CreatedModifiedModel):
class Meta:
app_label = 'main'
SETTINGS_TYPE_CHOICES = [
('string', "String"),
('int', 'Integer'),
('float', 'Decimal'),
('json', 'JSON'),
('password', 'Password'),
('list', 'List')
('string', _("String")),
('int', _('Integer')),
('float', _('Decimal')),
('json', _('JSON')),
('password', _('Password')),
('list', _('List'))
]
key = models.CharField(