mirror of
https://github.com/ansible/awx.git
synced 2026-05-11 19:37:38 -02:30
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:
@@ -16,6 +16,7 @@ from awx.main.models.ad_hoc_commands import * # noqa
|
||||
from awx.main.models.schedules import * # noqa
|
||||
from awx.main.models.activity_stream import * # noqa
|
||||
from awx.main.models.ha import * # noqa
|
||||
from awx.main.models.configuration import * # noqa
|
||||
|
||||
# Monkeypatch Django serializer to ignore django-taggit fields (which break
|
||||
# the dumpdata command; see https://github.com/alex/django-taggit/issues/155).
|
||||
@@ -55,6 +56,7 @@ activity_stream_registrar.connect(Job)
|
||||
activity_stream_registrar.connect(AdHocCommand)
|
||||
# activity_stream_registrar.connect(JobHostSummary)
|
||||
# activity_stream_registrar.connect(JobEvent)
|
||||
#activity_stream_registrar.connect(Profile)
|
||||
# activity_stream_registrar.connect(Profile)
|
||||
activity_stream_registrar.connect(Schedule)
|
||||
activity_stream_registrar.connect(CustomInventoryScript)
|
||||
activity_stream_registrar.connect(TowerSettings)
|
||||
|
||||
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user