mirror of
https://github.com/ansible/awx.git
synced 2026-02-01 01:28:09 -03:30
Show tags correctly in Django admin, use limited CharFields for fields without newlines to render admin appropriately.
This commit is contained in:
@@ -5,11 +5,12 @@ from lib.main.models import *
|
||||
class OrganizationAdmin(admin.ModelAdmin):
|
||||
|
||||
list_display = ('name', 'description', 'active')
|
||||
filter_horizontal = ('users', 'admins', 'projects')
|
||||
filter_horizontal = ('users', 'admins', 'projects', 'tags')
|
||||
|
||||
class InventoryAdmin(admin.ModelAdmin):
|
||||
|
||||
list_display = ('name', 'description', 'active')
|
||||
filter_horizontal = ('tags',)
|
||||
|
||||
class TagAdmin(admin.ModelAdmin):
|
||||
|
||||
@@ -18,46 +19,58 @@ class TagAdmin(admin.ModelAdmin):
|
||||
class AuditTrailAdmin(admin.ModelAdmin):
|
||||
|
||||
list_display = ('name', 'description', 'active')
|
||||
filter_horizontal = ('tags',)
|
||||
|
||||
|
||||
class HostAdmin(admin.ModelAdmin):
|
||||
|
||||
list_display = ('name', 'description', 'active')
|
||||
filter_horizontal = ('tags',)
|
||||
|
||||
class GroupAdmin(admin.ModelAdmin):
|
||||
|
||||
list_display = ('name', 'description', 'active')
|
||||
filter_horizontal = ('parents', 'hosts', 'tags')
|
||||
|
||||
class VariableDataAdmin(admin.ModelAdmin):
|
||||
|
||||
list_display = ('name', 'description', 'active')
|
||||
filter_horizontal = ('tags',)
|
||||
|
||||
class UserAdmin(admin.ModelAdmin):
|
||||
|
||||
list_display = ('name', 'description', 'active')
|
||||
filter_horizontal = ('tags',)
|
||||
|
||||
class CredentialAdmin(admin.ModelAdmin):
|
||||
|
||||
list_display = ('name', 'description', 'active')
|
||||
filter_horizontal = ('tags',)
|
||||
|
||||
class TeamAdmin(admin.ModelAdmin):
|
||||
|
||||
list_display = ('name', 'description', 'active')
|
||||
filter_horizontal = ('projects', 'users', 'organization', 'tags')
|
||||
|
||||
class ProjectAdmin(admin.ModelAdmin):
|
||||
|
||||
list_display = ('name', 'description', 'active')
|
||||
filter_horizontal = ('inventories', 'tags')
|
||||
|
||||
class PermissionAdmin(admin.ModelAdmin):
|
||||
|
||||
list_display = ('name', 'description', 'active')
|
||||
filter_horizontal = ('tags',)
|
||||
|
||||
class LaunchJobAdmin(admin.ModelAdmin):
|
||||
|
||||
list_display = ('name', 'description', 'active')
|
||||
filter_horizontal = ('tags',)
|
||||
|
||||
class LaunchJobStatusAdmin(admin.ModelAdmin):
|
||||
|
||||
list_display = ('name', 'description', 'active')
|
||||
filter_horizontal = ('tags',)
|
||||
|
||||
# FIXME: Add the rest of the models...
|
||||
|
||||
|
||||
Reference in New Issue
Block a user